|
From: Carles P. i E. <ca...@pi...> - 2007-01-20 09:58:35
|
Hello, I am searching and I don't find two minor things: 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 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 :-) Thanks! -- Carles Pina i Estany GPG id: 0x8CBDAE64 http://pinux.info Manresa - Barcelona |
|
From: Carles P. i E. <ca...@pi...> - 2007-01-20 11:39:18
|
Hi, On Jan/20/2007, Carles Pina i Estany wrote: > I am searching and I don't find two minor things: > 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 it seems that, for plot, there is set size square, etc. but not for splot. Any clue? -- Carles Pina i Estany GPG id: 0x8CBDAE64 http://pinux.info Manresa - Barcelona |
|
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 |
|
From: Carles P. i E. <ca...@pi...> - 2007-01-21 12:54:45
|
Hi, On Jan/20/2007, Lars Hoegen wrote: > > 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 saad. I will try your method in the future, if I need it... I can survive without it :-) > > 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. good enough! Yes, it makes the job :-) Thanks! -- Carles Pina i Estany GPG id: 0x8CBDAE64 http://pinux.info Manresa - Barcelona |
|
From: <HBB...@t-...> - 2007-01-21 23:44:24
|
Carles Pina i Estany wrote: > 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 You'll have to use pre-fixed ranges then. gnuplot doesn't do interdependency between axes. The new (in upcoming 4.2) feature of exporting the range end values to variables may help here, if you're OK with doing a "dummy" plot first, to find the numbers and copy them to the other axes. > 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 :-) See 'help ticslevel'. That's all gnuplot can do for you about this. Note that zero-axes are already a problem in 2D plots, which gets considerably worse in 3D. They end up in a region where data should be, tending to make the scale, the data, or even both of them unreadable. |