Re: [NTG-context] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-22 Thread Ethan Merritt
On Monday, November 22, 2010 07:01:07 am Mojca Miklavec wrote:
 On Fri, Nov 19, 2010 at 00:38, Florian Wobbe wrote:
 
  Thanks, I just updated the CVS version of gnuplot with your files and gave 
  it a try: It works with minimals!
 
  [...]
 
  Feedback and patches welcome!
 
  No patches I'm afraid. But feedback goes here:
 
  1) The label text of the following key element takes the color of the 
  preceding key symbol. Minimal example:
 
   set terminal lua tikz fulldoc size 15cm,7cm context
   set output 'plot.tex'
   set xrange [ 0 : 13 ]
   f1(x)=sqrt(x)
   f2(x)=sqrt(x*0.8)-3
   plot f1(x) lc rgb 'blue', f2(x)
 
 Confirmed. I had the problems with that in my terminal as well, but I
 think that it was a buglet in metapost back then; oh, good old
 memories ... :) :) :) I didn't check the details about this one.
 
  2) Negative axis labels are set with hyphen instead of proper minus sign, 
  which should be longer (see example above).
 
 I'm not sure if this should really be fixed automatically or not. In
 order to fix this one would have to patch gnuplot core.
 
 I forgot the details how to do it (I can find it out), but you can
 configure the layout of labels. In particular you may enclose the
 number into math delimiters ($). Maybe something like
 set format y $%.1f$
 would work (you might want to change the size of left margin then).
 Doing any other kind of magic would be a bit dangerous. Keep in mind
 that
 plot 'x.dat' u 1:(2*$2)
 will also fail since TeX will interpret $ as math delimiter. But
 changing that behaviour would have other undesirable effects.
 
  3) First I thought luatex hangs but then I noticed TikZ is awfully slow 
  when drawing plots with large amounts of data points (the tikzpicture had 
  about 3000 lines). I can speed this up by reducing the size by invoking 
  plot with:
 
   plot  gawk '(NR-1)%10 == 0 {print $0}' fileWithLotsOfData using [...]
 
  I wonder if there is a smarter way to do this in gnuplot.
 
 Using bitmap terminals. A while back I was dreaming about having
 mixed-mode with one terminal creating text labels and the other one
 (png for example) drawing the plot. But this needs some extra
 programming effort.

As I recall, I posted a patch the last time this discussion came up.
It turns off text output from the png terminal without affecting any
other graphical elements.  My though was that it could be the basis
of a pdflatex terminal class that works the same way as the current
epslatex terminals.  I can post it again, or upload it to SourceForge
if it isn't there already.

Ethan


 
 You would stumble against the same problem when using PS or PDF
 terminal, maybe only at a slightly bigger number of points.
 
 What I did for my theory of chaos reports and the million-of-points
 plots in my thesis was to create an empty plot with ConTeXt terminal,
 create a borderless plot with PNG and then manually insert PNG into
 the generated ConTeXt output, which you could do with TikZ output as
 well. It requires more effort, but there is no other way to speed up
 vector graphics. They are simply not suitable for drawing millions of
 points on the same plot.
 
 (Gnuplot also has a keyword 'every' to reduce the number of points,
 but in my case I wanted to plot all of them.)
 
 Mojca
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] UTF-8 characters and gnuplot module

2008-03-25 Thread Ethan Merritt
On Monday 24 March 2008 08:53, Mojca Miklavec wrote:
 
 PS: I'm CC-ing to Ethan in case he has some proposal about what could
 be done with metapost terminal to support UTF-8 (one of the best thing
 to do would be to remove cmr, but more is needed), and I'm CC-ing to
 the developer of the new TikZ terminal (for no specific reason).

Gnuplot's metapost terminal correctly passes through UTF-8 characters
to the output.  Metapost itself then mangles them.  If there is some
additional keyword or command that gnuplot could emit that would allow
metapost to do better, please let me know.  Otherwise I think this
problem must be resolved by using a different toolchain, one that is
UTF-8 aware.
 
Mojca:

  If the context terminal allows UTF-8 strings to be properly handled
by TeX, for me that's a strong argument in favor of including it in the
next gnuplot release.  Does it?

Ethan


-- 
Ethan A Merritt
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___