3
votes

I am trying to draw a 3D surface plot using gnuplot, with all three axes scaled the same. The problem is the z axis keeps being drawn so the image doesn't fit on the screen. The following commands reproduce the problem I am seeing:

set view 90,0
set view equal xyz
splot '-' using 1:2:3
-1 -1 0
-1 0 0
-1 1 0

0 -1 0
0 0 2
0 1 0

1 -1 0
1 0 0
1 1 0
e

You can't see the point (0,0,2), it is off the top of the view.

The problem seems to be twofold: 1. Although all three axes are set to be equal, it doesn't seem to be considering the range of the z axis in deciding what scale to use 2. For some reason it is inserting whitespace of height [zrange/2] between the x axis and where it actually starts the relevant tic range of the z axis.

I can work around (1) by forcing a larger range than it thinks necessary for the x axis, but (2) is still annoying in that it's wasting a lot of the space in the plot window.

Can anybody suggest what I am doing wrong and/or how to work around this? It feels like a straight bug in gnuplot to me, but am I making a mistake somewhere? Thanks for any suggestions

1

1 Answers

1
votes

The gnuplot's manual mentions set view equal xyz does not guarantee the z-axis shows up in the graphics. Thus, it remains to user to scale the graph appropriately.

For your second question, have you tried set ticslevel 0?