i am using the following gnuplot code to create a parameteric curve in gnuplot.
set terminal postscript eps size 5,3 enhanced color font 'Helvetica,20' lw 2
set output 'output.eps'
r=1
T=10
pi=3.14159
set parametric
set urange [0:T*pi]
fy(u) = rcos(u)
fx(u) = rsin(u)
fz(u) = u
set title "Plot of t->(sin(t),cos(t),t for t=0 to 10pi)"
set xtics -1,0.5,1
set ytics -1,0.5,1
set ztics 0,5,40
%set ztics add ("h" 35)
set arrow from 0,1,0 to sin(Tpi),cos(Tpi),Tpi
unset key
set label 1 at sin(Tpi),cos(Tpi),T*pi 'Q'
set label 2 at 0,1,0 'P'
splot fx(u),fy(u),fz(u) lc 'black'
I have mentioned the range for ztic from 0 to 40 and the maximum value that z assumes on plot is 31.4159 which means 35 should appear as tic on z. But this doesn't happen. I tried to even add 35 as tic forcibly using "set ztics add ("something" tic-value)" command but it still doesn't work. What should i add or remove so that 35 also appears as ztic ?
No, it doesn't mean that. Those commands you gave define the range in which the tics will be displayed. But that doesn't all by itself make the actual range of the axis extend all the way up to 40. For that, you have to change the zrange, not the tic setting.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hello,
i am using the following gnuplot code to create a parameteric curve in gnuplot.
set terminal postscript eps size 5,3 enhanced color font 'Helvetica,20' lw 2
set output 'output.eps'
r=1
T=10
pi=3.14159
set parametric
set urange [0:T*pi]
fy(u) = rcos(u)
fx(u) = rsin(u)
fz(u) = u
set title "Plot of t->(sin(t),cos(t),t for t=0 to 10pi)"
set xtics -1,0.5,1
set ytics -1,0.5,1
set ztics 0,5,40
%set ztics add ("h" 35)
set arrow from 0,1,0 to sin(Tpi),cos(Tpi),Tpi
unset key
set label 1 at sin(Tpi),cos(Tpi),T*pi 'Q'
set label 2 at 0,1,0 'P'
splot fx(u),fy(u),fz(u) lc 'black'
I have mentioned the range for ztic from 0 to 40 and the maximum value that z assumes on plot is 31.4159 which means 35 should appear as tic on z. But this doesn't happen. I tried to even add 35 as tic forcibly using "set ztics add ("something" tic-value)" command but it still doesn't work. What should i add or remove so that 35 also appears as ztic ?
Last edit: Vijay Dubey 2017-11-10
show zrange
would tell you that the autorange actually ends at 10 pi... Hence explicitely settingsolves your particular problem. For more on ranges see
help set xrange
.No, it doesn't mean that. Those commands you gave define the range in which the tics will be displayed. But that doesn't all by itself make the actual range of the axis extend all the way up to 40. For that, you have to change the zrange, not the tic setting.