Re: Creating Stiff Diagrams (Thomas Sefzick)

View: New views
2 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: Creating Stiff Diagrams (Thomas Sefzick)

by lyngly :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you kindly for the helpful reply. This looks promising.
Your code produces a graph with a range [-10:10], though there will be no negative concentrations. Both left and right, there will be a range [0:10], I'm wondering how to express that on the graph. Something like "xrange [10:0:10]" is not proper syntax I see.

Best Regards,
Joseph


------------------------------

Message: 4
Date: Sat, 24 Oct 2009 11:25:47 -0700 (PDT)
From: Thomas Sefzick <t.sefzick@...>
Subject: Re: [Gnuplot-info] Creating Stiff Diagrams
To: gnuplot-info@...
Message-ID: <26041711.post@...>
Content-Type: text/plain; charset=us-ascii


for a data file like this:

2. Na
8. Ca
9. Mg


1. Cl
10. HCO3
4. SO4

(i just tried to reproduce the plot on wikipedia.org)

the plot commands would be:

reset

set xrange [-10:10]
set xtics nomirror
set yrange [-0.5:2.5]
set y2range [-0.5:2.5]
set ytics 1.0 scale 0.0 nomirror
set y2tics 1.0 scale 0.0 nomirror

set border 1
set yzeroaxis linetype -1

plot "datafilename" using (-$1):0:ytic(2) index 0 with filledcurve x1=0
linetype 1 notitle, \
"" using 1:0:y2tic(2) index 1 with filledcurve x1=0 linetype 1 notitle

or, if the data file would look like this:

2. Na 1. Cl
8. Ca 10. HCO3
9. Mg 4. SO4

the above plot command could be:

plot "datafilename" using (-$1):0:ytic(2) with filledcurve x1=0 linetype 1
notitle, \
"" using 3:0:y2tic(4) with filledcurve x1=0 linetype 1 notitle


lyngly wrote:

>
> Hello,
>
> I am new to gnuplot, and am hoping I might be able to use it to create
> Stiff diagrams (link to wikipedia)--basically I want to plot some
> irregular hexagons that convey some information about ion composition in
> waters. My explanation will hopefully make more sense if you first view
> the example diagram on wikipedia.
>
> Plotting polygons looks fairly simple and straightforward, but only if I
> arbitrarily insert numbers I need. I am wondering if I can make a custom
> plot where the x axis is symmetrically bound (0, 20), left and right of 0,
> e.g. (+20----+10-----0----+10----+20), and the y axis has fixed values for
> specific ions.  Is there a way to map a text label for the ions to a
> specific numerical value, and have no intervening numerical values?
> For instance, if I will always have variables, a, b, c to the left of 0,
> a*,b*, c* to the right of 0, mapped to the same y-value constants (the ion
> of interest):
> (a, -1), (a*, -1*)
> (b, -8), (b*, -8*)
> (c, -15), (c*, -15*)
>
> where,
> -1, -8, -15 are just arbitrary positions for plotting the ion names (3 to
> left of 0, 3* to the right of 0). I looked through demo graphs and
> starting browsing through tutorials, but I didn't see anything immediately
> applicable. Where should I start? Any pointers?
>
> Thank you for reading!
>
> Joseph
>
>


     
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Gnuplot-info mailing list
Gnuplot-info@...
https://lists.sourceforge.net/lists/listinfo/gnuplot-info

Re: Creating Stiff Diagrams (Thomas Sefzick)

by Thomas Sefzick :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

you may rename the xtic labels:

set xrange [-10:10]
set xtics ("10" -10, "5" -5, "0" 0, "5" 5, "10" 10)

lyngly wrote:
Thank you kindly for the helpful reply. This looks promising.
Your code produces a graph with a range [-10:10], though there will be no negative concentrations. Both left and right, there will be a range [0:10], I'm wondering how to express that on the graph. Something like "xrange [10:0:10]" is not proper syntax I see.

Best Regards,
Joseph


------------------------------

Message: 4
Date: Sat, 24 Oct 2009 11:25:47 -0700 (PDT)
From: Thomas Sefzick <t.sefzick@fz-juelich.de>
Subject: Re: [Gnuplot-info] Creating Stiff Diagrams
To: gnuplot-info@lists.sourceforge.net
Message-ID: <26041711.post@talk.nabble.com>
Content-Type: text/plain; charset=us-ascii


for a data file like this:

2. Na
8. Ca
9. Mg


1. Cl
10. HCO3
4. SO4

(i just tried to reproduce the plot on wikipedia.org)

the plot commands would be:

reset

set xrange [-10:10]
set xtics nomirror
set yrange [-0.5:2.5]
set y2range [-0.5:2.5]
set ytics 1.0 scale 0.0 nomirror
set y2tics 1.0 scale 0.0 nomirror

set border 1
set yzeroaxis linetype -1

plot "datafilename" using (-$1):0:ytic(2) index 0 with filledcurve x1=0
linetype 1 notitle, \
"" using 1:0:y2tic(2) index 1 with filledcurve x1=0 linetype 1 notitle

or, if the data file would look like this:

2. Na 1. Cl
8. Ca 10. HCO3
9. Mg 4. SO4

the above plot command could be:

plot "datafilename" using (-$1):0:ytic(2) with filledcurve x1=0 linetype 1
notitle, \
"" using 3:0:y2tic(4) with filledcurve x1=0 linetype 1 notitle


lyngly wrote:
>
> Hello,
>
> I am new to gnuplot, and am hoping I might be able to use it to create
> Stiff diagrams (link to wikipedia)--basically I want to plot some
> irregular hexagons that convey some information about ion composition in
> waters. My explanation will hopefully make more sense if you first view
> the example diagram on wikipedia.
>
> Plotting polygons looks fairly simple and straightforward, but only if I
> arbitrarily insert numbers I need. I am wondering if I can make a custom
> plot where the x axis is symmetrically bound (0, 20), left and right of 0,
> e.g. (+20----+10-----0----+10----+20), and the y axis has fixed values for
> specific ions.  Is there a way to map a text label for the ions to a
> specific numerical value, and have no intervening numerical values?
> For instance, if I will always have variables, a, b, c to the left of 0,
> a*,b*, c* to the right of 0, mapped to the same y-value constants (the ion
> of interest):
> (a, -1), (a*, -1*)
> (b, -8), (b*, -8*)
> (c, -15), (c*, -15*)
>
> where,
> -1, -8, -15 are just arbitrary positions for plotting the ion names (3 to
> left of 0, 3* to the right of 0). I looked through demo graphs and
> starting browsing through tutorials, but I didn't see anything immediately
> applicable. Where should I start? Any pointers?
>
> Thank you for reading!
>
> Joseph
>
>


     
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Gnuplot-info mailing list
Gnuplot-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnuplot-info