Creating Stiff Diagrams

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

Creating Stiff Diagrams

by lyngly :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

by Thomas Sefzick :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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