help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Contour plots


From: Shai Ayal
Subject: Re: Contour plots
Date: Mon, 07 Mar 2005 10:05:40 +0200
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)

Henry,

Another way of fixing this would be to use another contour algorithm. There is one available on the maintainers list. It consists of 3 files -- two m-files and one oct file which you'll have to compile yourself using mkoctfile. It does not depend on anything else so you can just install it in a directory of your choice in your loadpath. This is an altogether different algorithm (taken from plplot) and you can get the actual contour lines ( i.e. y(x) ) from it.

I posted it to the maintainers list a few days ago, you can look it up from the octave homepage. If you have any problems, contact me.

Shai


Henry F. Mollet wrote:
Thanks for suggestions from you and Per. I did not say but Per probably knew
that I was saving directly as pdf within AquaTerm, albeit an old version. I
will have to think about upgrading which appears to be always easier said
than actually done and I was hoping to get by with what I have until I buy a
new computer running Tiger.

I also take note that my biggest problem may have to do with contour.m
itself and I may have to do it the hard way and calculate the contours as y
= y(x) and plot those directly. This will also allow me to plot additional
"contours" needed.
Henry



on 3/6/05 12:17 PM, Dmitri A. Sergatskov at address@hidden wrote:


Henry F. Mollet wrote:
...

See attached for the best I was able to come up with. Of *most concern* is
the jaggedness of the contours as the parameter w/al increases. It does not
appear to be related to the meshgrid.

...

It looks to me that you making a hardcopy of your screen picture with
your screen resolution. Try to make a postscript or pdf figure
directly by setting terminal and an output file.
Unfortunately one cannot use print() command in multiplot mode.

I modified your script:

gset term post enh color solid "Times" 10
gset out "henry11.ps"
subplot (2,2,4)                                        %  subplot (2,2,4)
gset origin 0.30,-0.07
axis ([0.2,1.2,0,35], "square"); % problems with "normal"
gset label 4 " D)  w/al = 12.0 " at 0.25, 27.5
grid "on"
x=linspace(0,1.2,350);
y=linspace(1,35,350);
[xx,yy]=meshgrid(x,y);
z=xx./(yy.*(1-xx)) -\
(12*yy-yy+1).*xx.^(12*yy-yy+1)./yy./(1-xx.^(12*yy-yy+1)) + eps;
xlabel ("Sa/lambda1")
ylabel ("alpha")
contour (x,y,z)
pause(1)

The attached file is epstopdf conversion of the resulting ps file.
The thing *I* do not understand is why ylabel not rotated.
Otherwise it looks good to me.

Regards,

Dmitri.




-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



--
Shai Ayal, Ph.D.
Head of Research
BioControl Medical BCM
3 Geron St.
Yehud 56100
ISRAEL
Tel:  + 972 3 6322 126
Fax:  + 972 3 6322 125
email: address@hidden



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]