|
From: Lars H. <la...@ho...> - 2007-01-20 15:21:36
|
Hi! > a) I am using splot command to paint some figures. I > would like that gnuplot autoscale (ok, done by default) > but I would like that gnuplot keeps the ratio for all > axis. Example: if gnuplot decides that x-axis has to be > from -6 to -6, I want that y-axis is from -6 to 6 and > z-axis too. Else my figures gets with "rare" shapes The simpest way to do this would of course be to choose the ranges by hand. You may use a variable within the set [xyz]range-command. Maybe your mathematical equations or yoour data allows to calcutlate good borders. As far as I could find out by studying the documentation, there is no way of telling gnuplot to keep an aspect ratio in 3D-plots. I had a kind of "brute force"-idea that might work, but I've not tested it yet. Let's say your x-range is choosen quite qell. So your aim is to set the y- and z-axis to the same ranges. I would first set the terminal to unkown, so that no output is created. Then I would do a coordinate transformation that changes x with y (resp x with z). If I would now plot the graph, the y-axis (z-axis) should have the right range. Before that I use the mechanism of writing back the automatically calulated ranges: set yrange [] writeback By doing this, gnuplot writes the now well calculated values for the upper and lower border of y to a memory. Afterwards I would reset the terminal to the one I would like to use for my output. If you now use set yrange [] nowriteback gnuplot should (If I am right) not change the ranges for y. > b) I want that x-axis, z-axis and y-axis are always > represented in z=0, x=0 and y=0. Any way to do it? z-axis > sometimes is represented in -6, is a bit confusing :-) Your problem cant't be solved completely, since gnuplot does not allow to move the z-markers from the border to the axes. The nearest solution would be like follows set ticslevel 0 # puts z=0 to x=0,y=0 set zeroaxis linetype 1 # produces lines on the axes x,y unset border # switches off the frame around the plot set xtics axis nomirror set ytics axis nomirror # puts the tics to the axes x,y You may "simulate" an z-axis by using the set arrow command, but you can't move the z-tics to this line. HTH Lars |