> Can someone tell me where to find a good example on how to create a
> boxes and lines on the same chart?
> Any way I can use the same input file for 4 sets of data or do I need to
> have a seperate file for each set of data?
> I was trying to plot boxes and could not get the size of the boxes to
> vary from the default using set boxwidth or by putting the size as the
> third column.
> So far I only have two columns for input as seen below, but I would like
> to add three more to my data file.
> I am using the following commands
> set timefmt "%m%d%y"
> set xdata time
> set time
> set boxwidth 6
> plot "new_feature_pnt.data" using 1:2 with boxes
> #Date Adds Changes Deletes Total Features
> 110197 0
> 120197 0
> 010198 1
> 020198 0
> 030198 0
> 040198 1
> 050198 0
> 060198 0
> 070198 2
> 080198 0
> 090198 0
> 100198 1
> 110198 1
> 120198 1
> 010199 0
> 020199 0
> 030199 0
> 040199 0
> 050199 0
> 060199 0
The 'using' option on the 'plot' command tells gnuplot which column to
use for x and which for y. So there's no problem with putting all your
data in one file.
And you can plot it all from the same 'plot' command. Just separate all
the info for a particular line with commas. Like this, perhaps:
plot 'new_feature_pnt.data' u 1:2 t 'Adds' w boxes,\
'' u 1:3 t 'Changes' w lines, '' u 1:4 t 'Deletes' w points
I've done a couple things in this example. First, since you're using 3.6
(or else the 'set xdata time' command wouldn't work), you can use a null
file name to tell gnuplot to reread the previous file. I also put an
explicit title on each plotted data set, as otherwise they will all have
the same title, which is the file name and the 'using' modifier. And for
brevity I abbreviated the options 'using', 'title', and 'with'.
Now about the boxwidth problem. I'd bet that this is due to the 'xdata time'
flag being set. When this is in effect, the units used internally for the
affected variable (in this case x) are seconds. So 'set boxwidth 6' should
give you a pretty narrow box, since 6 seconds won't be very wide on an axis
covering months. If you want the box to be one day wide, you'll need to use
'set boxwidth 86400'.
BTW, if you want to use boxes for all your data, I think you can do so by
adding a shift to the x-value in the 'using' string:
plot '' u ($1+86400):2
(I think this works in date/time mode...)
I hope this helps.