Multiple Graphs on Same Plot ?

Multiple Graphs on Same Plot ?

Post by Dirk Caspa » Sat, 08 Jan 2000 04:00:00


Quote:> Hi,

> I have a couple plotting/formating questions:

> 1)What is the proper syntax for plotting a datafile with one colunn specifying the x axis variable
> and other columns specifying y variables? For example, say the first column of the file contains
> the x variable and the next three the dependent variables as follows:

> x  y1      y2      y3
> .  .       .       .
> .  .       .       .
> .  .       .       .

to plot col 2 vs. col 1:

        plot 'datafilename.dat' using 1:2

or if you want to modify the values:

        plot 'datafilename.dat' using ($1*123):(log($3)*1.234)

Quote:> What is the synax for the 2-D plot command?

there's more than one possibility (parametric plot or not). The
most simple possibility is

        splot 'datafilename.dat' using 1:2:3

You should read the help via

        help plot
        help splot
        help set parametric

and may be the subtopics.

Quote:> 2) How do i place a text legend that describes each plot? What is the syntax?

        help set xlabel

Quote:> 3) Gnuplot prints the filename that is plotted in the upper left. How do you disable printing of
> the filename?

        help plot

, too

        plot 'datafilename.dat' using 1:3 title 'your title'


        'datafilename.dat' using 1:3 notitle

and read

        help set key

Quote:> Thank you in advance for your assistance,


 d!rk caspary

 Institut fuer Physikalische Chemie    Phone +49 (0)551 393135  (office)
 der Universitaet Goettingen                 +49 (0)551 393142  (fax)
 F.R. Germany                                +49 (0)551 5313337 (private)


Multiple Graphs on Same Plot ?

Post by Dirk Caspa » Tue, 11 Jan 2000 04:00:00

Date: Mon, 10 Jan 2000 08:20:51 +0100 (MET)

Subject: RE: Multiple Graphs on Same Plot ?
Fcc: sent-mail

X-Reply-UID: (2 > )(1 940926638 956){}INBOX
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Good morning (for me)!
I'm sorry, it seems that I understood your question wrong.

Quote:> Thank you for your response.

> 'set nokey' does exactly what i wanted, but i am still unsure about
> question 1.

> I am trying to plot column 1 on the x axis and have THREE graphs (sets of
> data) on the same plot each stored in a separate column in a datafile.
> Effectively, this would be 1:2 and 1:3 and 1:4 on the same plot, and I
> would like to be able to have a legend  with a lael for each curve
> (dataset). These labels wouls be different from the name of the X-axis. I
> did not see a clear explanation when I used in the 'help'

> Is this possible in gnuplot? What is the syntax?

If you will have the plots of the different columns in ONE plot

        plot 'data.dat' using 1:2 title 'mytitle 1',\
             'data.dat' using 1:4 title 'mytitle 2'

By this syntax you plot two plots of the same xrange (to change this
see 'plot (...) axis x1y1, plot (...) axis x2y1' in the 'help plot')
in one plot. If you want any label indipendantly of the data set you
could place them with

        set label 'blabla' at <x-position>,<y-position>

but then you don't have a sample point.

I hope that this is the answer to

Quote:>    These labels wouls be different
>    from the name of the X-axis.

If it is not, it's too early in the morning for me ...


 d!rk caspary

 Institut fuer Physikalische Chemie    Phone +49 (0)551 393135  (office)
 der Universitaet Goettingen                 +49 (0)551 393142  (fax)
 F.R. Germany                                +49 (0)551 5313337 (private)


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!

2. free PlantStudio

3. Plotting a Graph With Multiple Columns

4. works with riva128/zx but not with voodoo3???

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

6. Extensis Vector Tools

7. Multiple plots on same graph

8. Plotting Multiple data sets on the same graph

9. Plotting multiple lines in a single graph

10. plot multiple graphs


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