Multiple plots on same graph

Multiple plots on same graph

Post by James Ferre » Fri, 22 May 1998 04:00:00



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

Thanks for any help,

Jim

 
 
 

Multiple plots on same graph

Post by crawford richa » Fri, 22 May 1998 04:00:00




> 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.



 
 
 

Multiple plots on same graph

Post by James Ferr » Thu, 30 Jul 1998 04:00:00


Hello,

I just installed version

        G N U P L O T
        Unix version 3.5 (pre 3.6)
        patchlevel beta 347

Can anyone show me an example of boxes being filled or having hash marks in
them?

My help is not working.

Thanks,

Jim

--

*=====================+=================================*
|                                                       |
|                     Jim Ferree                        |
|          Motorola Cellular Switching Products         |
|                Software Quality/Process               |
|               phone : 847 435-2060                    |
|                 fax : 847 632-4552                    |
|               Pager : (847) 576-0295 21665 (alpha)    |

|                                                       |
|               send Jim a Text page:                   |
|   /usr/test/emx500/contrib/bin/pager  21665 "message" |
*=======================================================*

To send a page from outside Motorola:
http://lont1-fis3.comm.mot.com/webpage/webfiles/rampage.htm
Choose RampageText and use PIN 21665

 
 
 

Multiple plots on same graph

Post by crawford richa » Fri, 31 Jul 1998 04:00:00



Quote:> I just installed version

        > G N U P L O T
        > Unix version 3.5 (pre 3.6)
        > patchlevel beta 347

Quote:

> Can anyone show me an example of boxes being filled or having hash marks in
> them?

No -- filled boxes are not a feature in gnuplot.

There is a patch that adds it, however.  Look in the /incoming directory at
cmpc1.phys.soton.ac.uk.  The files with names that begin "filled" are the
ones you'll want.


 
 
 

1. Plotting multiple elements on one graph?

I'm trying to plot photon path traversals around probabilisitic
singularity regions. The trick is, I need to be able to place all on
the same graph.

What I'd like gnuplot to do is:
  1) plot the dozen or so singularity regions, with color 1
  2) plot the single photon path traversal, with color 2
...all on the same graph / grid space.

Also if possible, I'd also like to draw a boundary around the
collection of points defining each of the singularity regions, and
fill each in with a certain color.

I've looked at the 'multiplot' command. However, it doesn't seem to
allow me to overlay the plots on top of each other. And I don't see
how to draw the singularity boundary regions, nor fill them in with a
particular color.

Thanks for your help!
Alex

2. Manipulation of images/bitmaps in X11

3. Plotting a Graph With Multiple Columns

4. background

5. Plotting Multiple Graphs w Different #'s of datapoints

6. Image Shape Breakdown

7. Multiple Graphs on Same Plot ?

8. help

9. Plotting Multiple data sets on the same graph

10. Plotting multiple lines in a single graph

11. plot multiple graphs

12. MULTIPLE PLOTS ON THE SAME GRAPH USING GNUPLOT in C

13. plotting multiple graph from nultiple data set within one data file