|
From: Dima K. <gn...@di...> - 2022-08-11 22:18:36
Attachments:
tics-too-big.png
|
Hi. I just made some 3D plots from an orthogonal side view (set view
90,0). This has special-case logic in gnuplot to treat it like a 2D plot
in some ways. It looks like the logic isn't completely right, though,
and the tics on the xy plane end up larger than they should. And the
tics appear on both sides of the plane, which isn't obviously right. Can
somebody please take a look?
This happens with the latest gnuplot in git.
The script appears below, and the result is attached.
Thanks!
set view 90,0
set xyplane at -0.1
set xtics 0.5
set ytics 0.5
set view equal xyz
set xlabel "x"
set ylabel "y"
set zlabel "z"
set terminal png size 600,1000
set output "/tmp/tics-too-big.png"
splot '-' using 1:2:3:4:5:6 notitle with vectors , \
'-' using 1:2:3:4:5:6 notitle with vectors
0.0 0.0 0.0 0.3333335701378377 0.0 0.0
0.0 0.0 0.0 0.0 0.3333335701378377 0.0
0.0 0.0 0.0 0.0 0.0 0.6666671402756754
e
-1.487915757943345 -0.8842424394390623 4.822904587742955 0.3295936234755228 -0.004829189464130801 0.04955795873753832
-1.487915757943345 -0.8842424394390623 4.822904587742955 0.0054208354243061585 0.33327029824180776 -0.0035765673425567357
-1.487915757943345 -0.8842424394390623 4.822904587742955 -0.09899347227801636 0.008684749800146774 0.6592191922953985
e
set output
|
|
From: Ethan A M. <me...@uw...> - 2022-08-12 00:15:17
|
On Thursday, 11 August 2022 15:06:40 PDT Dima Kogan wrote:
> Hi. I just made some 3D plots from an orthogonal side view (set view
> 90,0). This has special-case logic in gnuplot to treat it like a 2D plot
> in some ways. It looks like the logic isn't completely right, though,
> and the tics on the xy plane end up larger than they should. And the
> tics appear on both sides of the plane, which isn't obviously right. Can
> somebody please take a look?
I'll have a look.
Meanwhile as you probably found, you can "fix" the output with
set xtics nomirror scale 0.5
It's also a bit weird that "set xyplane at <foo>" is actually
acting as if it were "set xrange [ low : high + foo ].
I worry that setting <foo> to anything other than zero may
have other unexpected side effects.
Ethan
> This happens with the latest gnuplot in git.
>
> The script appears below, and the result is attached.
>
> Thanks!
>
>
>
> set view 90,0
> set xyplane at -0.1
> set xtics 0.5
> set ytics 0.5
> set view equal xyz
> set xlabel "x"
> set ylabel "y"
> set zlabel "z"
>
> set terminal png size 600,1000
> set output "/tmp/tics-too-big.png"
> splot '-' using 1:2:3:4:5:6 notitle with vectors , \
> '-' using 1:2:3:4:5:6 notitle with vectors
> 0.0 0.0 0.0 0.3333335701378377 0.0 0.0
> 0.0 0.0 0.0 0.0 0.3333335701378377 0.0
> 0.0 0.0 0.0 0.0 0.0 0.6666671402756754
> e
> -1.487915757943345 -0.8842424394390623 4.822904587742955 0.3295936234755228 -0.004829189464130801 0.04955795873753832
> -1.487915757943345 -0.8842424394390623 4.822904587742955 0.0054208354243061585 0.33327029824180776 -0.0035765673425567357
> -1.487915757943345 -0.8842424394390623 4.822904587742955 -0.09899347227801636 0.008684749800146774 0.6592191922953985
> e
> set output
>
>
>
--
Ethan A Merritt
Biomolecular Structure Center, K-428 Health Sciences Bldg
MS 357742, University of Washington, Seattle 98195-7742
|
|
From: Dima K. <gn...@di...> - 2022-08-12 01:13:47
|
Thanks for looking, Ethan. Something is being strangely proportional. If I make the same plot, but do so interactively, (without "set terminal" or "set output"), then I see the length of the tics change as I interactively move the xyplane (shift+button2+drag up/down). |
|
From: Ethan A M. <me...@uw...> - 2022-08-12 17:16:04
|
On Thursday, 11 August 2022 18:10:44 PDT Dima Kogan wrote: > > It's also a bit weird that "set xyplane at <foo>" is actually > > acting as if it were "set xrange [ low : high + foo ]. > > I worry that setting <foo> to anything other than zero may > > have other unexpected side effects. > > > > Ethan > Something is being strangely proportional. If > I make the same plot, but do so interactively, (without "set terminal" > or "set output"), then I see the length of the tics change as I > interactively move the xyplane (shift+button2+drag up/down). That would be an example of "unexpected side effects" :-) I think the tic lengths are changing due to the changing aspect ratio of the plot. I see the same effect just by changing the window size by dragging a corner with the mouse. There does seem to be a difference between gnuplot 4 and gnuplot 5, so the change/bug/quirk/whatever probably dates back a few years. I'll have a look but I'm working on other things right now. Ethan |
|
From: Ethan A M. <me...@uw...> - 2022-08-13 22:10:54
|
On Thursday, 11 August 2022 15:06:40 PDT Dima Kogan wrote: > Hi. I just made some 3D plots from an orthogonal side view (set view > 90,0). This has special-case logic in gnuplot to treat it like a 2D plot > in some ways. It looks like the logic isn't completely right, though, > and the tics on the xy plane end up larger than they should. And the > tics appear on both sides of the plane, which isn't obviously right. Can > somebody please take a look? I think there is not an easy fix for this. The original code assumes that the vertical axis is "y" just about everywhere, and calculates various scale factors using that assumption. A complete fix would have to handle all the various possible projections and rotations as special cases wherever it makes a difference. Possibly the odd placement of mirrored tics can be repaired, or tic mirroring ignored in this projection. I'll look at that. But the tic length - meh. You can fix it for any given plot using "set xtic scale" so IMHO it's not a high priority to rework all the code just for that. But if someone is inspired to do so, fine - go for it. I suggest that you file this as a bug report on the tracker so it isn't forgotten. Ethan |