ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Peter Hedwig <peter@affenbande.org>,
	Ethan Merritt <merritt@u.washington.edu>
Subject: Re: Gnuplot module: Patching of Gnuplot binary still needed?
Date: Mon, 22 Nov 2010 16:01:07 +0100	[thread overview]
Message-ID: <AANLkTikumYPQgUtLh+C9o3fBiHHHRVkDwWzzAzyLg-+D@mail.gmail.com> (raw)
In-Reply-To: <DAED76FB-B853-44A4-8CAE-DC36FC28670F@awi.de>

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.

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
___________________________________________________________________________________

  reply	other threads:[~2010-11-22 15:01 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-14 22:04 Paul Menzel
2010-11-15 11:29 ` Mojca Miklavec
     [not found]   ` <201011152131.18476.peter@affenbande.org>
2010-11-17 10:47     ` Mojca Miklavec
2010-11-18 23:38       ` Florian Wobbe
2010-11-22 15:01         ` Mojca Miklavec [this message]
2010-11-22 18:12           ` Ethan Merritt
2010-11-22 19:15           ` Florian Wobbe
2010-11-22 21:03             ` Mojca Miklavec
2010-11-22 21:19               ` Aditya Mahajan
2010-11-22 21:26                 ` Mojca Miklavec
2010-11-22 22:20                 ` Alan BRASLAU
2010-11-22 21:44               ` Florian Wobbe
2010-11-22 22:10                 ` Mojca Miklavec
2010-11-18  6:11   ` Jonas Stein
2011-01-09 21:50     ` jeroen.muskee
2011-01-09 18:54       ` Mojca Miklavec
2011-01-09 19:01         ` Aditya Mahajan
2011-01-09 23:20         ` Mojca Miklavec
2011-01-11  3:26           ` jeroen.muskee
2010-11-18 18:28   ` Paul Menzel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTikumYPQgUtLh+C9o3fBiHHHRVkDwWzzAzyLg-+D@mail.gmail.com \
    --to=mojca.miklavec.lists@gmail.com \
    --cc=merritt@u.washington.edu \
    --cc=ntg-context@ntg.nl \
    --cc=peter@affenbande.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).