emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* create vector-graphics with org-babel
@ 2015-09-09  7:50 Max Linke
  2015-09-09 10:41 ` John Kitchin
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Max Linke @ 2015-09-09  7:50 UTC (permalink / raw)
  To: emacs-orgmode

Hi

I'm trying to use vector graphics in my org document

#+BEGIN_SRC ipython :session :file iso.svg :exports results
   x = np.linspace(0, 10, 100)
   y = np.sin(x)
   plt.plot(x, y)
#+END_SRC

I can run this cell with 'C-c C-c' but I can't export it to latex
because it says that svg is currently not supported. Is there a way
to include svg (or another type of vector graphics) export into my
document.

Another interesting thing to know is how I can change the DPI of the
produced png?

best Max

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: create vector-graphics with org-babel
  2015-09-09  7:50 create vector-graphics with org-babel Max Linke
@ 2015-09-09 10:41 ` John Kitchin
  2015-09-09 16:02 ` Aaron Ecay
  2015-09-14 17:12 ` Suvayu Ali
  2 siblings, 0 replies; 5+ messages in thread
From: John Kitchin @ 2015-09-09 10:41 UTC (permalink / raw)
  To: Max Linke; +Cc: emacs-orgmode

maybe have a look here: http://tex.stackexchange.com/questions/2099/how-to-include-svg-diagrams-in-latex
Max Linke writes:

> Hi
>
> I'm trying to use vector graphics in my org document
>
> #+BEGIN_SRC ipython :session :file iso.svg :exports results
>    x = np.linspace(0, 10, 100)
>    y = np.sin(x)
>    plt.plot(x, y)
> #+END_SRC
>
> I can run this cell with 'C-c C-c' but I can't export it to latex
> because it says that svg is currently not supported. Is there a way
> to include svg (or another type of vector graphics) export into my
> document.
>
> Another interesting thing to know is how I can change the DPI of the
> produced png?
>
> best Max

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: create vector-graphics with org-babel
  2015-09-09  7:50 create vector-graphics with org-babel Max Linke
  2015-09-09 10:41 ` John Kitchin
@ 2015-09-09 16:02 ` Aaron Ecay
  2015-09-13 11:14   ` Max Linke
  2015-09-14 17:12 ` Suvayu Ali
  2 siblings, 1 reply; 5+ messages in thread
From: Aaron Ecay @ 2015-09-09 16:02 UTC (permalink / raw)
  To: Max Linke, emacs-orgmode

Hi Max,

What version of org are you using?  Latex export should support svg
since commit 0cef5b63e, which is in version 8.1+.  (You do need to
install and configure the “svg” package for latex in order to compile
the document.)

-- 
Aaron Ecay

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: create vector-graphics with org-babel
  2015-09-09 16:02 ` Aaron Ecay
@ 2015-09-13 11:14   ` Max Linke
  0 siblings, 0 replies; 5+ messages in thread
From: Max Linke @ 2015-09-13 11:14 UTC (permalink / raw)
  To: emacs-orgmode

I found out that the error is related to the ob-ipython package. They 
currently only allow png's. Using the normal ob-python everything works. 
Thanks for the help though.

On 09/09/2015 06:02 PM, Aaron Ecay wrote:
> Hi Max,
>
> What version of org are you using?  Latex export should support svg
> since commit 0cef5b63e, which is in version 8.1+.  (You do need to
> install and configure the “svg” package for latex in order to compile
> the document.)
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: create vector-graphics with org-babel
  2015-09-09  7:50 create vector-graphics with org-babel Max Linke
  2015-09-09 10:41 ` John Kitchin
  2015-09-09 16:02 ` Aaron Ecay
@ 2015-09-14 17:12 ` Suvayu Ali
  2 siblings, 0 replies; 5+ messages in thread
From: Suvayu Ali @ 2015-09-14 17:12 UTC (permalink / raw)
  To: emacs-orgmode

On Wed, Sep 09, 2015 at 09:50:58AM +0200, Max Linke wrote:
> Hi
> 
> I'm trying to use vector graphics in my org document
> 
> #+BEGIN_SRC ipython :session :file iso.svg :exports results
>   x = np.linspace(0, 10, 100)
>   y = np.sin(x)
>   plt.plot(x, y)
> #+END_SRC
> 
> I can run this cell with 'C-c C-c' but I can't export it to latex
> because it says that svg is currently not supported. Is there a way
> to include svg (or another type of vector graphics) export into my
> document.

If you want vector graphics, but do not care about the specific type of
vector graphics, you can always use pdf.  IIUC, you are using
matplotlib.  So pdfs are supported, just configure PdfPages from
matplotlib.backends.backend_pdf.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-09-14 17:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-09  7:50 create vector-graphics with org-babel Max Linke
2015-09-09 10:41 ` John Kitchin
2015-09-09 16:02 ` Aaron Ecay
2015-09-13 11:14   ` Max Linke
2015-09-14 17:12 ` Suvayu Ali

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).