all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* org-plot file export options
@ 2010-06-11 20:12 John Hendy
  2010-06-11 20:35 ` Eric Schulte
  0 siblings, 1 reply; 19+ messages in thread
From: John Hendy @ 2010-06-11 20:12 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1511 bytes --]

Hi,


A couple questions:

My current plot options are as follows:
#+PLOT: title:"Formulation Viscosities" ind:1 type:2d with:lines
#+PLOT: set:"xlabel 'Temperature (C)'" set:"ylabel 'Viscosity (cP)'"

1) I've been trying to output a file and can only manage to get PNGs to
work.
--- I've tried the recommendations here:
http://www.mail-archive.com/emacs-orgmode@gnu.org/msg07825.html
--- In other words, I've used the given examples from Eric of:

#+PLOT: file:"~/Desktop/test.jpg"

As well as:

#+PLOT set:"terminal jpg transparent nocrop enhanced font arial 8"
#+PLOT set:"output '~/Desktop/test.jpg'"

And both resultant files don't open in Evince or Gimp.

I've also tried the options from Wikipedia on plotting, found here:
http://en.wikipedia.org/wiki/Wikipedia%3AHow_to_create_graphs_for_Wikipedia_articles
--- That article seems to recommend svg or ps format, later modified
with Gimp or another program for use


2) How does one generate better quality with gnuplot? The one thing
that does work is simply #+PLOT: file:"~/Desktop/test.png" but the
resultant file is unacceptable
for my report. The letters look very pixelated. My questions above are
actually asked because I need to get a handle on how to generate a
better graph for my report...
--- The text is pretty bad and using #+PLOT: set:"terminal fsize #"
doesn't seem to change this. Is my syntax bad? I was working from this
option from the wiki linked above:

set terminal svg enhanced size 1000 1000 fname "Times" fsize 36


Thanks!
John

[-- Attachment #1.2: Type: text/html, Size: 3097 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: org-plot file export options
  2010-06-11 20:12 org-plot file export options John Hendy
@ 2010-06-11 20:35 ` Eric Schulte
  2010-06-12 10:17   ` [OT] gnuplot quality (was Re: org-plot file export options) Eric S Fraga
  0 siblings, 1 reply; 19+ messages in thread
From: Eric Schulte @ 2010-06-11 20:35 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode

Hi John,

If you're going to be doing anything complicated with your plots you may
want to try using org-babel [1] rather than using org-plot.

The following should Org-babel alternative should work.

1) ensure org-babel in installed on your system, and gnuplot is
   activated.
   
   ;; Org-babel
   (require 'org-babel-init)
   (require 'org-babel-gnuplot)

2) Name your table with a #+tblname: just before the start of your table
   line, e.g.

   #+tblname: formulation-viscosities
   | your table contents | go right here |

3) create a gnuplot code block, which takes your table as an argument
   and plots it to a file, notice `:var' and `:file' the header
   arguments

   #+begin_src gnuplot :var data=formulation-viscosities :file ~/Desktop/test.jpg
     set terminal jpg transparent nocrop enhanced font arial 8
     set xlabel 'Temperature (C)'
     set ylabel 'Viscosity (cP)
     set title 'Formulation Viscosities'
     plot "$data" with lines
   #+end_src

WRT: the ugliness of gnuplot to file, I've wrestled with this myself and
I know exactly what you mean.  Currently I try to use svg or png images
when exporting to html, and for pdf I use the gnuplot tikz terminal [2].

Gnuplot in combination with tikz results in *beautiful* plots, which
render and resize well.  However it took me hours to get everything
configured, so it may not be for everyone.

Good Luck -- Eric

John Hendy <jw.hendy@gmail.com> writes:

> Hi,
>
>
> A couple questions:
>
> My current plot options are as follows:
> #+PLOT: title:"Formulation Viscosities" ind:1 type:2d with:lines
> #+PLOT: set:"xlabel 'Temperature (C)'" set:"ylabel 'Viscosity (cP)'"
>
> 1) I've been trying to output a file and can only manage to get PNGs to
> work.
> --- I've tried the recommendations here:
> http://www.mail-archive.com/emacs-orgmode@gnu.org/msg07825.html
> --- In other words, I've used the given examples from Eric of:
>
> #+PLOT: file:"~/Desktop/test.jpg"
>
> As well as:
>
> #+PLOT set:"terminal jpg transparent nocrop enhanced font arial 8"
> #+PLOT set:"output '~/Desktop/test.jpg'"
>
> And both resultant files don't open in Evince or Gimp.
>
> I've also tried the options from Wikipedia on plotting, found here:
> http://en.wikipedia.org/wiki/Wikipedia%3AHow_to_create_graphs_for_Wikipedia_articles
> --- That article seems to recommend svg or ps format, later modified
> with Gimp or another program for use
>
>
> 2) How does one generate better quality with gnuplot? The one thing
> that does work is simply #+PLOT: file:"~/Desktop/test.png" but the
> resultant file is unacceptable
> for my report. The letters look very pixelated. My questions above are
> actually asked because I need to get a handle on how to generate a
> better graph for my report...
> --- The text is pretty bad and using #+PLOT: set:"terminal fsize #"
> doesn't seem to change this. Is my syntax bad? I was working from this
> option from the wiki linked above:
>
> set terminal svg enhanced size 1000 1000 fname "Times" fsize 36
>
>
> Thanks!
> John
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Footnotes: 
[1]  http://orgmode.org/worg/org-contrib/babel/

[2]  http://peter.affenbande.org/gnuplot/

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

* [OT] gnuplot quality (was Re: org-plot file export options)
  2010-06-11 20:35 ` Eric Schulte
@ 2010-06-12 10:17   ` Eric S Fraga
  2010-06-12 10:24     ` Eric S Fraga
                       ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Eric S Fraga @ 2010-06-12 10:17 UTC (permalink / raw)
  To: Eric Schulte; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 973 bytes --]

On Fri, 11 Jun 2010 13:35:52 -0700, "Eric Schulte" <schulte.eric@gmail.com> wrote:

[...]

> WRT: the ugliness of gnuplot to file, I've wrestled with this myself and
> I know exactly what you mean.  Currently I try to use svg or png images
> when exporting to html, and for pdf I use the gnuplot tikz terminal [2].

John & Eric,

Another approach, which I use and which doesn't require using the
development version of gnuplot for the tikz support, is to generate
encapsulated postscript files:

  set terminal postscript eps enhanced 20
  set output "graph.eps"

for instance.  Then, if I need bitmap images, I use "convert" from
ImageMagick to create these from the EPS files with the required
density (depending on intended use, whether screen display or
printing), as in

  convert -quality 95 -density 300 graph.eps graph.png

With EPS, you can get very nice looking text, especially with the
"enhanced" gnuplot set terminal option and the result is size
independent.

[-- Attachment #2: Type: text/plain, Size: 75 bytes --]

-- 
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [OT] gnuplot quality (was Re: org-plot file export options)
  2010-06-12 10:17   ` [OT] gnuplot quality (was Re: org-plot file export options) Eric S Fraga
@ 2010-06-12 10:24     ` Eric S Fraga
  2010-06-18 20:43       ` John Hendy
  2010-06-12 15:18     ` John Hendy
  2010-06-12 15:23     ` [OT] gnuplot quality Eric Schulte
  2 siblings, 1 reply; 19+ messages in thread
From: Eric S Fraga @ 2010-06-12 10:24 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 481 bytes --]

On Sat, 12 Jun 2010 11:17:33 +0100, Eric S Fraga <ucecesf@ucl.ac.uk> wrote:

[...]

> for instance.  Then, if I need bitmap images, I use "convert" from
> ImageMagick to create these from the EPS files with the required
> density (depending on intended use, whether screen display or
> printing), as in
> 
>   convert -quality 95 -density 300 graph.eps graph.png

Ooops, ignore the "-quality 95" as that is only appropriate if you are
creating a lossy format output, such as jpeg!

[-- Attachment #2: Type: text/plain, Size: 75 bytes --]

-- 
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [OT] gnuplot quality (was Re: org-plot file export options)
  2010-06-12 10:17   ` [OT] gnuplot quality (was Re: org-plot file export options) Eric S Fraga
  2010-06-12 10:24     ` Eric S Fraga
@ 2010-06-12 15:18     ` John Hendy
  2010-06-12 15:23     ` [OT] gnuplot quality Eric Schulte
  2 siblings, 0 replies; 19+ messages in thread
From: John Hendy @ 2010-06-12 15:18 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1276 bytes --]

Thanks for both tips -- I'll give these a try on Monday when I'm back at
work. Much appreciated!

On Sat, Jun 12, 2010 at 5:17 AM, Eric S Fraga <ucecesf@ucl.ac.uk> wrote:

> On Fri, 11 Jun 2010 13:35:52 -0700, "Eric Schulte" <schulte.eric@gmail.com>
> wrote:
>
> [...]
>
> > WRT: the ugliness of gnuplot to file, I've wrestled with this myself and
> > I know exactly what you mean.  Currently I try to use svg or png images
> > when exporting to html, and for pdf I use the gnuplot tikz terminal [2].
>
> John & Eric,
>
> Another approach, which I use and which doesn't require using the
> development version of gnuplot for the tikz support, is to generate
> encapsulated postscript files:
>
>  set terminal postscript eps enhanced 20
>  set output "graph.eps"
>
> for instance.  Then, if I need bitmap images, I use "convert" from
> ImageMagick to create these from the EPS files with the required
> density (depending on intended use, whether screen display or
> printing), as in
>
>  convert -quality 95 -density 300 graph.eps graph.png
>
> With EPS, you can get very nice looking text, especially with the
> "enhanced" gnuplot set terminal option and the result is size
> independent.
>
> --
> Eric S Fraga
> GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D
>
>

[-- Attachment #1.2: Type: text/html, Size: 1755 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [OT] gnuplot quality
  2010-06-12 10:17   ` [OT] gnuplot quality (was Re: org-plot file export options) Eric S Fraga
  2010-06-12 10:24     ` Eric S Fraga
  2010-06-12 15:18     ` John Hendy
@ 2010-06-12 15:23     ` Eric Schulte
  2010-06-12 20:16       ` Eric S Fraga
  2 siblings, 1 reply; 19+ messages in thread
From: Eric Schulte @ 2010-06-12 15:23 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-orgmode

Eric S Fraga <ucecesf@ucl.ac.uk> writes:

> On Fri, 11 Jun 2010 13:35:52 -0700, "Eric Schulte" <schulte.eric@gmail.com> wrote:
>
> [...]
>
>> WRT: the ugliness of gnuplot to file, I've wrestled with this myself and
>> I know exactly what you mean.  Currently I try to use svg or png images
>> when exporting to html, and for pdf I use the gnuplot tikz terminal [2].
>
> John & Eric,
>
> Another approach, which I use and which doesn't require using the
> development version of gnuplot for the tikz support, is to generate
> encapsulated postscript files:
>
>   set terminal postscript eps enhanced 20
>   set output "graph.eps"
>

Thanks!

I just tried the above (well technically the below [1]) and it does look
great and scales well.  It's nice to have a light-weight alternative to
tikz -- a great addition to my plotting toolbox.

Best -- Eric

>
> for instance.  Then, if I need bitmap images, I use "convert" from
> ImageMagick to create these from the EPS files with the required
> density (depending on intended use, whether screen display or
> printing), as in
>
>   convert -density 300 graph.eps graph.png
>
> With EPS, you can get very nice looking text, especially with the
> "enhanced" gnuplot set terminal option and the result is size
> independent.

Footnotes: 
[1]  
--8<---------------cut here---------------start------------->8---
#+begin_src gnuplot
  set terminal postscript eps enhanced 20 color
  set output "~/Desktop/graph.eps"
  set isosample 30,30
  set title 'bumpy'
  set xrange[-4:4]
  set yrange[-4:4]
  splot sin(x) + sin(y) notitle
#+end_src
--8<---------------cut here---------------end--------------->8---

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

* Re: [OT] gnuplot quality
  2010-06-12 15:23     ` [OT] gnuplot quality Eric Schulte
@ 2010-06-12 20:16       ` Eric S Fraga
  2010-06-13  2:35         ` Alan E. Davis
  0 siblings, 1 reply; 19+ messages in thread
From: Eric S Fraga @ 2010-06-12 20:16 UTC (permalink / raw)
  To: Eric Schulte; +Cc: org-mode mailing list

[-- Attachment #1: Type: text/plain, Size: 1783 bytes --]

On Sat, 12 Jun 2010 08:23:44 -0700, "Eric Schulte" <schulte.eric@gmail.com> wrote:
> 
> Eric S Fraga <ucecesf@ucl.ac.uk> writes:
> 
> > On Fri, 11 Jun 2010 13:35:52 -0700, "Eric Schulte" <schulte.eric@gmail.com> wrote:
> >
> > [...]
> >
> >> WRT: the ugliness of gnuplot to file, I've wrestled with this myself and
> >> I know exactly what you mean.  Currently I try to use svg or png images
> >> when exporting to html, and for pdf I use the gnuplot tikz terminal [2].
> >
> > John & Eric,
> >
> > Another approach, which I use and which doesn't require using the
> > development version of gnuplot for the tikz support, is to generate
> > encapsulated postscript files:
> >
> >   set terminal postscript eps enhanced 20
> >   set output "graph.eps"
> >
> 
> Thanks!
> 
> I just tried the above (well technically the below [1]) and it does look
> great and scales well.  It's nice to have a light-weight alternative to
> tikz -- a great addition to my plotting toolbox.
> 
> Best -- Eric

[...]

> Footnotes: 
> [1]  
> --8<---------------cut here---------------start------------->8---
> #+begin_src gnuplot
>   set terminal postscript eps enhanced 20 color
>   set output "~/Desktop/graph.eps"
>   set isosample 30,30
>   set title 'bumpy'
>   set xrange[-4:4]
>   set yrange[-4:4]
>   splot sin(x) + sin(y) notitle
> #+end_src
> --8<---------------cut here---------------end--------------->8---
> 
> 

You're very welcome.  I use a number of methods to generate graphs and
diagrams and gnuplot is definitely one of my favourites.  For the
adventurous, there's a great blog: 

http://gnuplot-tricks.blogspot.com/

Put gnuplot together with org-mode and org-babel and it's yet another
piece in the puzzle that leads to an incredibly powerful desktop
analysis and publishing system!

[-- Attachment #2: Type: text/plain, Size: 75 bytes --]

-- 
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Re: [OT] gnuplot quality
  2010-06-12 20:16       ` Eric S Fraga
@ 2010-06-13  2:35         ` Alan E. Davis
  2010-06-13 10:03           ` [OT] what about asymptote ? Nicolas Goaziou
  2010-06-15 13:35           ` [babel] Re: Re: [OT] gnuplot quality Eric S Fraga
  0 siblings, 2 replies; 19+ messages in thread
From: Alan E. Davis @ 2010-06-13  2:35 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: org-mode mailing list


[-- Attachment #1.1: Type: text/plain, Size: 2796 bytes --]

I use the gri plotting language to make plots.  Does anyone here use this?



I am over my head in trying to use babel as a literate programming tool; yet
that's exactly what I need to do, else at least have a method for
coordinating better comments / notes with the code.

Gnuplot was ok when I didn't need quailty graphs.

I also need to learn to make a number of other types of plots, including
polar plots.  I understand that it is possible with gri, but haven't set
down to try to get my head around the process.

Alan Davis

On Sun, Jun 13, 2010 at 6:16 AM, Eric S Fraga <ucecesf@ucl.ac.uk> wrote:

> On Sat, 12 Jun 2010 08:23:44 -0700, "Eric Schulte" <schulte.eric@gmail.com>
> wrote:
> >
> > Eric S Fraga <ucecesf@ucl.ac.uk> writes:
> >
> > > On Fri, 11 Jun 2010 13:35:52 -0700, "Eric Schulte" <
> schulte.eric@gmail.com> wrote:
> > >
> > > [...]
> > >
> > >> WRT: the ugliness of gnuplot to file, I've wrestled with this myself
> and
> > >> I know exactly what you mean.  Currently I try to use svg or png
> images
> > >> when exporting to html, and for pdf I use the gnuplot tikz terminal
> [2].
> > >
> > > John & Eric,
> > >
> > > Another approach, which I use and which doesn't require using the
> > > development version of gnuplot for the tikz support, is to generate
> > > encapsulated postscript files:
> > >
> > >   set terminal postscript eps enhanced 20
> > >   set output "graph.eps"
> > >
> >
> > Thanks!
> >
> > I just tried the above (well technically the below [1]) and it does look
> > great and scales well.  It's nice to have a light-weight alternative to
> > tikz -- a great addition to my plotting toolbox.
> >
> > Best -- Eric
>
> [...]
>
> > Footnotes:
> > [1]
> > --8<---------------cut here---------------start------------->8---
> > #+begin_src gnuplot
> >   set terminal postscript eps enhanced 20 color
> >   set output "~/Desktop/graph.eps"
> >   set isosample 30,30
> >   set title 'bumpy'
> >   set xrange[-4:4]
> >   set yrange[-4:4]
> >   splot sin(x) + sin(y) notitle
> > #+end_src
> > --8<---------------cut here---------------end--------------->8---
> >
> >
>
> You're very welcome.  I use a number of methods to generate graphs and
> diagrams and gnuplot is definitely one of my favourites.  For the
> adventurous, there's a great blog:
>
> http://gnuplot-tricks.blogspot.com/
>
> Put gnuplot together with org-mode and org-babel and it's yet another
> piece in the puzzle that leads to an incredibly powerful desktop
> analysis and publishing system!
>
> --
> Eric S Fraga
> GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>

[-- Attachment #1.2: Type: text/html, Size: 3965 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* [OT] what about asymptote ?
  2010-06-13  2:35         ` Alan E. Davis
@ 2010-06-13 10:03           ` Nicolas Goaziou
  2010-06-13 16:31             ` Eric Schulte
  2010-06-15 13:35           ` [babel] Re: Re: [OT] gnuplot quality Eric S Fraga
  1 sibling, 1 reply; 19+ messages in thread
From: Nicolas Goaziou @ 2010-06-13 10:03 UTC (permalink / raw)
  To: Alan E. Davis; +Cc: org-mode mailing list

<87eigde28n.fsf@gmail.com>
<87d3vw8shu.wl%ucecesf@ucl.ac.uk>
<87631o8ebj.fsf@gmail.com>
<87wru4uhux.wl%ucecesf@ucl.ac.uk>
<AANLkTikoyClhdvuiSB11vYMRCEivO9hX3n3rDRsowdS9@mail.gmail.com>
User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/23.2 Mule/6.0 (HANACHIRUSATO)

Hello,

While I'm at it, I'd like to suggest asymptote as a neat tool to draw
all those graphs.

Here are two examples illustrating it (admittedly not so well for the
surface, but I explain why in my comments) :

#+begin_src asymptote
import graph3;
size(7cm,0);

currentprojection=orthographic(-4,-2,3);

// define function f(z), where z ( z.x , z.y )
real f(pair z) { return sin(z.x) + sin(z.y); }

// Drawing meshes (pen for surface is nullpen)
draw(surface(f,(-4,-4),(4,4),nx=30),nullpen,meshpen=red,nolight);

// Dumb axis but my asymptote version is too old for something
// more complex
xaxis3();
yaxis3();
zaxis3();
#+end_src

#+begin_src asymptote :file graph-asy-polar.pdf
import graph;
size(7cm,0);

// defining function and its graph
real f(real t) {return sqrt(2)/2-cos(3t);}
path Cf=polargraph(f,0,2pi,n=1440,operator ..)--cycle;

// drawing graph
draw(Cf,.8bp+red);

// axis and units
xaxis("$x$");
yaxis("$y$");
draw((0,0)--(1,0),.8bp+blue,Arrow());
draw((0,0)--(0,1),.8bp+blue,Arrow());
#+end_src

--
Nicolas

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

* Re: [OT] what about asymptote ?
  2010-06-13 10:03           ` [OT] what about asymptote ? Nicolas Goaziou
@ 2010-06-13 16:31             ` Eric Schulte
  2010-06-13 17:48               ` Nicolas Goaziou
  0 siblings, 1 reply; 19+ messages in thread
From: Eric Schulte @ 2010-06-13 16:31 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: org-mode mailing list

Hi Nicolas,

I agree asymptote does generate beautiful figures (does it use the same
pgf backend as tikz)?

However my most common graphical need is to display data read in from an
external file or from the command line, which I believe is orthogonal to
the main asymptote functionality.

Best -- Eric

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Hello,
>
> While I'm at it, I'd like to suggest asymptote as a neat tool to draw
> all those graphs.
>
> Here are two examples illustrating it (admittedly not so well for the
> surface, but I explain why in my comments) :
>
> #+begin_src asymptote
> import graph3;
> size(7cm,0);
>
> currentprojection=orthographic(-4,-2,3);
>
> // define function f(z), where z ( z.x , z.y )
> real f(pair z) { return sin(z.x) + sin(z.y); }
>
> // Drawing meshes (pen for surface is nullpen)
> draw(surface(f,(-4,-4),(4,4),nx=30),nullpen,meshpen=red,nolight);
>
> // Dumb axis but my asymptote version is too old for something
> // more complex
> xaxis3();
> yaxis3();
> zaxis3();
> #+end_src
>
> #+begin_src asymptote :file graph-asy-polar.pdf
> import graph;
> size(7cm,0);
>
> // defining function and its graph
> real f(real t) {return sqrt(2)/2-cos(3t);}
> path Cf=polargraph(f,0,2pi,n=1440,operator ..)--cycle;
>
> // drawing graph
> draw(Cf,.8bp+red);
>
> // axis and units
> xaxis("$x$");
> yaxis("$y$");
> draw((0,0)--(1,0),.8bp+blue,Arrow());
> draw((0,0)--(0,1),.8bp+blue,Arrow());
> #+end_src
>
> --
> Nicolas
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [OT] what about asymptote ?
  2010-06-13 16:31             ` Eric Schulte
@ 2010-06-13 17:48               ` Nicolas Goaziou
  0 siblings, 0 replies; 19+ messages in thread
From: Nicolas Goaziou @ 2010-06-13 17:48 UTC (permalink / raw)
  To: Eric Schulte; +Cc: org-mode mailing list

>>>>> Eric Schulte writes:

> I agree asymptote does generate beautiful figures (does it use the same
> pgf backend as tikz)?

Asymptote is unrelated to pgf. IMHO, it is far more powerful (i.e. 3D
functionality) but admittedly less integrated into LaTeX (that's why
org-babel is god sent).

> However my most common graphical need is to display data read in from an
> external file or from the command line, which I believe is orthogonal to
> the main asymptote functionality.

Asymptote can read and write text and XDR files. I'm not sure about the
command line thing.

Regards,

-- Nicolas

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

* [babel] Re: Re: [OT] gnuplot quality
  2010-06-13  2:35         ` Alan E. Davis
  2010-06-13 10:03           ` [OT] what about asymptote ? Nicolas Goaziou
@ 2010-06-15 13:35           ` Eric S Fraga
  2010-06-15 15:30             ` Eric Schulte
                               ` (2 more replies)
  1 sibling, 3 replies; 19+ messages in thread
From: Eric S Fraga @ 2010-06-15 13:35 UTC (permalink / raw)
  To: Alan E. Davis; +Cc: org-mode mailing list

[-- Attachment #1: Type: text/plain, Size: 1027 bytes --]

On Sun, 13 Jun 2010 12:35:43 +1000, "Alan E. Davis" <lngndvs@gmail.com> wrote:

> I use the gri plotting language to make plots.  Does anyone here use this?
> 
> I am over my head in trying to use babel as a literate programming tool; yet
> that's exactly what I need to do, else at least have a method for
> coordinating better comments / notes with the code.

Alan,

I don't use gri.  I have had a quick look at it and it should be
possible (for others, not me :() to create an org-babel interface for
this.  If you have any elisp knowledge, you could try starting from
one of the existing language implementations.  You could also try to
use the support for sh in org-babel but you'd have to get the table
data into a file first.  Others may have more reasonable suggestions,
however...

I am surprised, however, at this comment:

> Gnuplot was ok when I didn't need quailty graphs.

in what way does gnuplot fall short in terms of quality?  (but keep
this part of the conversatino off-list please to avoid annoying others)

[-- Attachment #2: Type: text/plain, Size: 75 bytes --]

-- 
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [babel] Re: Re: [OT] gnuplot quality
  2010-06-15 13:35           ` [babel] Re: Re: [OT] gnuplot quality Eric S Fraga
@ 2010-06-15 15:30             ` Eric Schulte
  2010-06-16 10:27             ` Štěpán Němec
  2010-06-17  3:07             ` Alan E. Davis
  2 siblings, 0 replies; 19+ messages in thread
From: Eric Schulte @ 2010-06-15 15:30 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: org-mode mailing list

Eric S Fraga <ucecesf@ucl.ac.uk> writes:

> On Sun, 13 Jun 2010 12:35:43 +1000, "Alan E. Davis" <lngndvs@gmail.com> wrote:
>
>> I use the gri plotting language to make plots.  Does anyone here use this?
>> 
>> I am over my head in trying to use babel as a literate programming tool; yet
>> that's exactly what I need to do, else at least have a method for
>> coordinating better comments / notes with the code.
>
> Alan,
>
> I don't use gri.  I have had a quick look at it and it should be
> possible (for others, not me :() to create an org-babel interface for
> this.  If you have any elisp knowledge, you could try starting from
> one of the existing language implementations.  You could also try to
> use the support for sh in org-babel but you'd have to get the table
> data into a file first.

If this is something you're interested in, you could start by making a
copy of org-babel-gnuplot.el, and then search/replace gnuplot/gri, and
you'll be most of the way there.

The gnuplot file already has support for dropping tables to
tab-separated files, and then placing the paths to those files into the
body of code blocks, which may be sufficient for table support in gri --
although having not heard of gri before this email I can't say for sure.

Best -- Eric

> Others may have more reasonable suggestions, however...
>
> I am surprised, however, at this comment:
>
>> Gnuplot was ok when I didn't need quailty graphs.
>
> in what way does gnuplot fall short in terms of quality?  (but keep
> this part of the conversatino off-list please to avoid annoying others)

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

* Re: [babel] Re: Re: [OT] gnuplot quality
  2010-06-15 13:35           ` [babel] Re: Re: [OT] gnuplot quality Eric S Fraga
  2010-06-15 15:30             ` Eric Schulte
@ 2010-06-16 10:27             ` Štěpán Němec
  2010-06-17  3:07             ` Alan E. Davis
  2 siblings, 0 replies; 19+ messages in thread
From: Štěpán Němec @ 2010-06-16 10:27 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: org-mode mailing list

Eric S Fraga <ucecesf@ucl.ac.uk> writes:
> I am surprised, however, at this comment:
>
>> Gnuplot was ok when I didn't need quailty graphs.
>
> in what way does gnuplot fall short in terms of quality?  (but keep
> this part of the conversatino off-list please to avoid annoying others)

I can't speak for others, but I'm very interested in this and have found
the suggestions in the thread very useful, so please keep it on-list!
After all, a lot of Org users (will) need some kind of plotting
solution, so this kind of discussion is naturally useful to them.

After all, disregarding unwanted e-mails is definitely easier than
getting to see the off-list ones ;-)

Štěpán

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

* Re: [babel] Re: Re: [OT] gnuplot quality
  2010-06-15 13:35           ` [babel] Re: Re: [OT] gnuplot quality Eric S Fraga
  2010-06-15 15:30             ` Eric Schulte
  2010-06-16 10:27             ` Štěpán Němec
@ 2010-06-17  3:07             ` Alan E. Davis
  2 siblings, 0 replies; 19+ messages in thread
From: Alan E. Davis @ 2010-06-17  3:07 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: org-mode mailing list

Hello Eric:

On Tue, Jun 15, 2010 at 1:35 PM, Eric S Fraga <ucecesf@ucl.ac.uk> wrote:

> I am surprised, however, at this comment:
>
>> Gnuplot was ok when I didn't need quailty graphs.
>
> in what way does gnuplot fall short in terms of quality?  (but keep
> this part of the conversatino off-list please to avoid annoying others)

I don't have a great deal to say about this, so I will keep my remarks
on the list.

I needed/wanted a tool to produce publication quality graphs.  Gnuplot
is great, and I have used it in the past, to make tide graphs.  In my
experience, controls of the details of the graph were less accessible
to me, and the graphs I produced were pretty rough edged.  GRI has
worked very well for me for monthly tide graph calendars, with good
control of parameters.  GNUPLOT is fantastic for quick, and what I
felt were rough and ready plots.

GRI is easily installed on Ubuntu installs, and a gri mode for emacs
makes it easier.

I will try the suggestions you made to work out a babel solution for gri plots.

Thanks for the suggestions,

Alan

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

* Re: [OT] gnuplot quality (was Re: org-plot file export options)
  2010-06-12 10:24     ` Eric S Fraga
@ 2010-06-18 20:43       ` John Hendy
  2010-06-18 21:00         ` [OT] gnuplot quality Eric Schulte
  2010-06-18 21:13         ` [OT] gnuplot quality (was Re: org-plot file export options) Nick Dokos
  0 siblings, 2 replies; 19+ messages in thread
From: John Hendy @ 2010-06-18 20:43 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1070 bytes --]

Tried this and it works well -- the output is definitely much better! One
oddity -- the EPS generated is black and white whereas the typical output
was in color... silly option I'm missing?


On Sat, Jun 12, 2010 at 5:24 AM, Eric S Fraga <ucecesf@ucl.ac.uk> wrote:

> On Sat, 12 Jun 2010 11:17:33 +0100, Eric S Fraga <ucecesf@ucl.ac.uk>
> wrote:
>
> [...]
>
> > for instance.  Then, if I need bitmap images, I use "convert" from
> > ImageMagick to create these from the EPS files with the required
> > density (depending on intended use, whether screen display or
> > printing), as in
> >
> >   convert -quality 95 -density 300 graph.eps graph.png
>
> Ooops, ignore the "-quality 95" as that is only appropriate if you are
> creating a lossy format output, such as jpeg!
>
> --
> Eric S Fraga
> GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>

[-- Attachment #1.2: Type: text/html, Size: 1638 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [OT] gnuplot quality
  2010-06-18 20:43       ` John Hendy
@ 2010-06-18 21:00         ` Eric Schulte
  2010-06-18 21:13         ` [OT] gnuplot quality (was Re: org-plot file export options) Nick Dokos
  1 sibling, 0 replies; 19+ messages in thread
From: Eric Schulte @ 2010-06-18 21:00 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode

John Hendy <jw.hendy@gmail.com> writes:

> Tried this and it works well -- the output is definitely much better! One
> oddity -- the EPS generated is black and white whereas the typical output
> was in color... silly option I'm missing?
>

try

  set terminal postscript eps color enhanced 20

instead of

  set terminal postscript eps enhanced 20

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

* Re: [OT] gnuplot quality (was Re: org-plot file export options)
  2010-06-18 20:43       ` John Hendy
  2010-06-18 21:00         ` [OT] gnuplot quality Eric Schulte
@ 2010-06-18 21:13         ` Nick Dokos
  2010-06-18 22:04           ` John Hendy
  1 sibling, 1 reply; 19+ messages in thread
From: Nick Dokos @ 2010-06-18 21:13 UTC (permalink / raw)
  To: John Hendy; +Cc: nicholas.dokos, emacs-orgmode

John Hendy <jw.hendy@gmail.com> wrote:

> Tried this and it works well -- the output is definitely much better! One oddity -- the EPS
> generated is black and white whereas the typical output was in color... silly option I'm missing?
> 

"monochrome" is default:

,----
| set terminal postscript eps enhanced 20
| Terminal type set to 'postscript'
| Options are 'eps enhanced defaultplex \
|    leveldefault monochrome colortext \
|    dashed dashlength 1.0 linewidth 1.0 butt \
|    palfuncparam 2000,0.003 \
|    "Helvetica" 20 '
`----

Say "help set terminal postcript" to gnuplot and it'll spew (among other things):


,----
|  `default` sets all options to their defaults: `landscape`, `monochrome`,
|  `dashed`, `dl 1.0`, `lw 1.0`, `defaultplex`, `noenhanced`, "Helvetica" and
|  14pt.  Default size of a PostScript plot is 10 inches wide and 7 inches high.
|  The option `color` enables color, while `monochrome` prefers black and white
|  drawing elements. Further, `monochrome` uses gray `palette` but it does not
|  change color of objects specified with an explicit `colorspec`.
|  `solid` draws all plots with solid lines, overriding any dashed patterns.
|  `dashlength` or `dl` scales the length of the dashed-line segments by <DL>,
|  which is a floating-point number greater than zero.
|  `linewidth` or `lw` scales all linewidths by <LW>.
`----

HTH,
Nick

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

* Re: [OT] gnuplot quality (was Re: org-plot file export options)
  2010-06-18 21:13         ` [OT] gnuplot quality (was Re: org-plot file export options) Nick Dokos
@ 2010-06-18 22:04           ` John Hendy
  0 siblings, 0 replies; 19+ messages in thread
From: John Hendy @ 2010-06-18 22:04 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1576 bytes --]

Much appreciated. Color works perfectly.

On Fri, Jun 18, 2010 at 4:13 PM, Nick Dokos <nicholas.dokos@hp.com> wrote:

> John Hendy <jw.hendy@gmail.com> wrote:
>
> > Tried this and it works well -- the output is definitely much better! One
> oddity -- the EPS
> > generated is black and white whereas the typical output was in color...
> silly option I'm missing?
> >
>
> "monochrome" is default:
>
> ,----
> | set terminal postscript eps enhanced 20
> | Terminal type set to 'postscript'
> | Options are 'eps enhanced defaultplex \
> |    leveldefault monochrome colortext \
> |    dashed dashlength 1.0 linewidth 1.0 butt \
> |    palfuncparam 2000,0.003 \
> |    "Helvetica" 20 '
> `----
>
> Say "help set terminal postcript" to gnuplot and it'll spew (among other
> things):
>
>
> ,----
> |  `default` sets all options to their defaults: `landscape`, `monochrome`,
> |  `dashed`, `dl 1.0`, `lw 1.0`, `defaultplex`, `noenhanced`, "Helvetica"
> and
> |  14pt.  Default size of a PostScript plot is 10 inches wide and 7 inches
> high.
> |  The option `color` enables color, while `monochrome` prefers black and
> white
> |  drawing elements. Further, `monochrome` uses gray `palette` but it does
> not
> |  change color of objects specified with an explicit `colorspec`.
> |  `solid` draws all plots with solid lines, overriding any dashed
> patterns.
> |  `dashlength` or `dl` scales the length of the dashed-line segments by
> <DL>,
> |  which is a floating-point number greater than zero.
> |  `linewidth` or `lw` scales all linewidths by <LW>.
> `----
>
> HTH,
> Nick
>
>

[-- Attachment #1.2: Type: text/html, Size: 2142 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

end of thread, other threads:[~2010-06-18 22:04 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-11 20:12 org-plot file export options John Hendy
2010-06-11 20:35 ` Eric Schulte
2010-06-12 10:17   ` [OT] gnuplot quality (was Re: org-plot file export options) Eric S Fraga
2010-06-12 10:24     ` Eric S Fraga
2010-06-18 20:43       ` John Hendy
2010-06-18 21:00         ` [OT] gnuplot quality Eric Schulte
2010-06-18 21:13         ` [OT] gnuplot quality (was Re: org-plot file export options) Nick Dokos
2010-06-18 22:04           ` John Hendy
2010-06-12 15:18     ` John Hendy
2010-06-12 15:23     ` [OT] gnuplot quality Eric Schulte
2010-06-12 20:16       ` Eric S Fraga
2010-06-13  2:35         ` Alan E. Davis
2010-06-13 10:03           ` [OT] what about asymptote ? Nicolas Goaziou
2010-06-13 16:31             ` Eric Schulte
2010-06-13 17:48               ` Nicolas Goaziou
2010-06-15 13:35           ` [babel] Re: Re: [OT] gnuplot quality Eric S Fraga
2010-06-15 15:30             ` Eric Schulte
2010-06-16 10:27             ` Štěpán Němec
2010-06-17  3:07             ` Alan E. Davis

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.