Reputation: 25
I would like to remove specific xtic values (hours axis) in my graph that are not being used with other data. To be precise, I want to keep the following Xranges [0:5, 12:14], but not the xrange [6:11]. This is to help space out my data, since the unused space is currently smashing them together. I will attach a picture to visualize. Thank you for any help
I tried 'set xrange [0:5, 12:14]' but it did not work.
Upvotes: 0
Views: 196
Reputation: 25714
It is important to know the exact structure of the data because the plotting code needs to adapt to it. For the following example the data structure is as follows:
x y z
data.0 1 2 3 5 12 14
) whereas y and z vary.index
(check help index
).help pseudocolumns
) which contains the block number starting from 0.help xticlabels
).Code:
### plot "non-equidistant" data equidistant
reset session
# create some test data
set print $Data
do for [x in "0 1 2 3 5 12 14"] {
do for [y=-40:40] {
print sprintf("%s %g %g", x, y, (16-x)*cos(0.05*y)**2)
}
print "\n\n"
}
set print
set xyplane at 0
set grid x,y
set view 60,140
set key at screen 0.3, screen 0.95 noautotitle
set xrange [-0.5:6.5]
splot for [i=0:6] $Data u -2:2:3:xtic(1) index i w l lc i
### end of code
Result:
Upvotes: 1