Hello,
I'm having some trouble with the following code:
(running Gri v. 2.12.13, on Debian linux)
*************************************************
#~~~~~~~~~~~~~~~~~~~~~~~~~~
# open file and skip header
#~~~~~~~~~~~~~~~~~~~~~~~~~~
open "vertical.dat"
skip 2
set line width .2
#~~~~~~~~~~~~~~~~~~~~~~
# set y axis parameters
#~~~~~~~~~~~~~~~~~~~~~~
set y name "log p [mbar]"
set y type log
set y axis 930 50
#~~~~~~~~~~~~~~~~~~~~~~
# set x axis parameters
#~~~~~~~~~~~~~~~~~~~~~~
set x axis 250 450 50 10
set x name "$\theta$ [K]"
#~~~~~~~~~~~~~~~~
# read theta data
#~~~~~~~~~~~~~~~~
read columns * * y * x
#~~~~~~~~~~~
# plot theta
#~~~~~~~~~~~
draw curve
#~~~~~~~~~~~~~~~
# read zeta data
#~~~~~~~~~~~~~~~
rewind
skip 2
read columns * x y
#~~~~~~~~~~
# plot zeta
#~~~~~~~~~~
set line width .2
set dash .01 .03
set color red
draw curve
#~~~~~~~~~~~~~~~
# draw the title
#~~~~~~~~~~~~~~~
set color black
draw title "$\theta$ vs. Log Pressure"
*************************************************
The trouble is, the y-axis label is printed from top to bottom, rather than bottom to top, which seems to me to be the more intuitive way to read it.
Worse, if I add
set y axis name horizontal
the label is printed upside-down.
However, when I run the same script without the
set y type log
as in the following,
*************************************************
#~~~~~~~~~~~~~~~~~~~~~~~~~~
# open file and skip header
#~~~~~~~~~~~~~~~~~~~~~~~~~~
open "vertical.dat"
skip 2
set line width .2
#~~~~~~~~~~~~~~~~~~~~~~
# set y axis parameters
#~~~~~~~~~~~~~~~~~~~~~~
set y name "p [mbar]"
#set y type log
set y axis 930 50 -50 -10
#~~~~~~~~~~~~~~~~~~~~~~
# set x axis parameters
#~~~~~~~~~~~~~~~~~~~~~~
set x axis 250 450 50 10
set x name "$\theta$ [K]"
#~~~~~~~~~~~~~~~~
# read theta data
#~~~~~~~~~~~~~~~~
read columns * * y * x
#~~~~~~~~~~~
# plot theta
#~~~~~~~~~~~
draw curve
#~~~~~~~~~~~~~~~
# read zeta data
#~~~~~~~~~~~~~~~
rewind
skip 2
read columns * x y
#~~~~~~~~~~
# plot zeta
#~~~~~~~~~~
set line width .2
set dash .01 .03
set color red
draw curve
#~~~~~~~~~~~~~~~
# draw the title
#~~~~~~~~~~~~~~~
set color black
draw title "$\theta$ vs. Pressure"
*************************************************
the label is printed normally.
Any help with this matter would be greatly appreciated.
Thank you.
Mike Herman
gri command file; data file; postscripts
Logged In: YES
user_id=31559
Originator: NO
Followup: this occurs only when the axis range is specified, and when that range is decreasing. (This is just a note from the author, to the author.)
Logged In: YES
user_id=31559
Originator: NO
Hi. This is fixed in the CVS version, I think.
It will be 2 weeks before I can incorporate the fix into an official release, however. (Making a release is quite time consuming. The fix itself took under two minutes. I normally gather 4 or more bug fixes before making a release, simply to avoid spending most of the time in releases, not in debugging.)
I hope this helps.
Thanks, again, for the bug report.
Dan.
Logged In: YES
user_id=31559
Originator: NO
The latest CVS version of Gri has been modified to address this issue,
but I would appreciate it if you could check. To do this, follow these four
steps ...
cvs -d:pserver:anonymous@gri.cvs.sourceforge.net:/cvsroot/gri login
cvs -z3 -d:pserver:anonymous@gri.cvs.sourceforge.net:/cvsroot/gri co gri
./configure
make
... and then try running this new gri on your bug file, e.g. by typing
./gri -directory . bugfile.gri
... and post here the results.
Please note: the CVS version is NOT FOR EVERYDAY use. It is just for
testing. It works on your issue AT THE MOMENT when I'm making this
report, but it could fail later, as I (or other developers) change other
things in Gri.
Thanks. Dan.
Logged In: YES
user_id=1658049
Originator: YES
Thanks for the fix! It seems to work fine. Files posted below.
Mike
File Added: bug_resolved.tar.gz
gri script, good and bad postscripts made with same script but different versions