Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #3282
| From | Ethan A Merritt <EAMerritt@gmail.com> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Re: plot with offset in labels |
| Date | 2016-04-01 18:08 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <ndn5t4$rm9$1@dont-email.me> (permalink) |
| References | <ndmjlo$7d4$1@solani.org> |
Karl Ratzsch wrote:
> Can anybody tell me what is wrong with this plot (tested in gp5.0.3)?
>
> ====
> $data << EOD
> 402 32 6
> 404 107 22
> 406 139 51
>
>
> 402 34 6
> 404 64 22
> 406 84 51
> EOD
>
> unset key
>
> plot $data index 1 us 3:2 w p,\
> $data index 0 us 3:2 w p
>
> replot $data index 1 us 3:2:("left") with labels offset 2,0
> replot $data index 0 us 3:2:("up") with labels offset 0,1
> ====
>
> If I comment out any of the two later plots, no error occurs.
> Without any offset, there is also no problem.
The problem is that "offset" in the general case takes up to
3 following values: x, y, and z. It stops if it doesn't encounter
a comma before the next value. So this syntax confuses it:
plot $foo ... offset x,y, $baz
because it tries to interpret $baz as a z offset value rather than
a new plot.
This was a problem for a long time, but it has been fixed in the
cvs version by teaching the relevant get_position_xxx() routines
that in a 2D context they should only expect 2 values.
That was largish set of patches that do not apply cleanly to
version 5.0 so backporting is not automatic.
Ethan
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Next in thread | Find similar
plot with offset in labels Karl Ratzsch <mail.kfr@gmx.net> - 2016-04-01 21:54 +0200
Re: plot with offset in labels Ethan A Merritt <EAMerritt@gmail.com> - 2016-04-01 18:08 -0700
Re: plot with offset in labels Karl Ratzsch <mail.kfr@gmx.net> - 2016-04-03 19:36 +0200
csiph-web