help-octave
[Top][All Lists]
Advanced

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

contour.m multiplot in Gnuplot 3.8 and 4.0


From: Henry F. Mollet
Subject: contour.m multiplot in Gnuplot 3.8 and 4.0
Date: Mon, 18 Jul 2005 17:04:44 -0700
User-agent: Microsoft-Entourage/11.1.0.040913

Attached is an old multiplot using contour.m . It was created with Octave
2.1.46/Gnuplot 3.8.

The new one using the same script (see attached and also inserted below) was
created with Octave 2.1.71/Gnuplot 4.0 and is a "mess". I tried to attach a
pdf but did not realize that it was 500 kB and John E. told me to make the
message smaller. The fact that it is so large is likely due to the same
problem.

I've spent days fiddling with the code in the script but nothing seems to
work in Gnuplot 4.0. I need some guidelines how to best approach the
problem. The scripts used to create the plots are exactly the same and so is
contour.m, as far as I can tell. As a last step, I've made sure that the
Fig1.m file attached worked perfectly on the old iMac with Octave
2.1.46/Gnuplot 3.8 duplicating Fig1Old.pdf attached.

As a picture is worth a thousand words and I cannot attach Fig1New.pdf, I'll
try my best to explain:
1. Subplot 1 is missing the y-label, and the y-scale is missing the 2nd
digit. The key is also missing. When I put the code into a single plot (at
the end) it works as it should.
2. Subplots 2-4 have superimposed keys and I don't know how to clear the key
inbetween subplots.
3. Probably easiest to run attached Fig1.m and see what you get. I have to
assume that you run into the same problems if you use
G N U P L O T
        Version 4.0 patchlevel 0
        last modified Thu Apr 15 14:44:22 CEST 2004
        System: Darwin 8.1.0.

Once this problem is sorted out, I can move on and try out better contour
plots using Shai Ayai's oct version of contour.m which I could not use
because my Octave 2.1.46 does not support dynamic linking

Henry



# July 2005, was ScrAbarOalphaContours.m, kept only multiplot 10251
clearplot

%*************
gset nomultiplot   
gset term aqua 1   
gset multiplot     
gset size 0.7, 0.7 
title (' ')
gset nolabel
gset format x "%.1f"
gset format y "%.0f"                                        % Does not work
on first subplot!? July 2005

grid "on"
gset key

subplot (2,2,1)    
% subplot (2,2,1)
gset origin -0.175,0.38
gset key           
% no longer works July 2005
gset size 0.7, 0.7 % was 0.6, 0.6
axis ([0.2,1.2,0,35], "square");
gset label 1 " A)  w/al = 3.0 " at 0.25, 27.5
x=linspace(0,1.2,35);
y=linspace(1,35,35);
[xx,yy]=meshgrid(x,y);
z=xx./(yy.*(1-xx)) - (3*yy-yy+1).*xx.^(3*yy-yy+1)./yy./(1-xx.^(3*yy-yy+1)) +
eps;
xlabel ("Sa/lambda1")
ylabel (" alpha")                                                        %
produces nothing !? July 2005
contour (x,y,z)    
gset nolabel
gset nokey                                                        % Trying
to get rid of the old key, July 2005

subplot (2,2,2)    
% subplot (2,2,2)
gset origin 0.30,0.38
gset key                                                % here I get
superimposed keys from subplots 1 and 2?
axis ([0.2,1.2,0,35], "square"); gset label 2 " B)  w/al = 6.0 " at 0.25,
27.5
x=linspace(0,1.2,35);
y=linspace(1,35,35);
[xx,yy]=meshgrid(x,y);
z=xx./(yy.*(1-xx)) - (6*yy-yy+1).*xx.^(6*yy-yy+1)./yy./(1-xx.^(6*yy-yy+1)) +
eps;
xlabel ("Sa/lambda1")
ylabel (" alpha")
contour (x,y,z)
gset nolabel

subplot (2,2,3)    
%  subplot (2,2,3)
gset origin -0.175,-0.07
axis ([0.2,1.2,0,35], "square");
gset label 3 " C)  w/al = 9.0 " at 0.25, 27.5
x=linspace(0,1.2,35);
y=linspace(1,35,35);
[xx,yy]=meshgrid(x,y);
z=xx./(yy.*(1-xx)) - (9*yy-yy+1).*xx.^(9*yy-yy+1)./yy./(1-xx.^(9*yy-yy+1)) +
eps;
xlabel ("Sa/lambda1")
ylabel (" alpha")  
contour (x,y,z) 
gset nolabel

subplot (2,2,4)    
%  subplot (2,2,4)
gset origin 0.30,-0.07
axis ([0.2,1.2,0,35], "square");
gset label 4 " D)  w/al = 12.0 " at 0.25, 27.5
x=linspace(0,1.2,35);
y=linspace(1,35,35);
[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)
gset nolabel

%*************
% Now creating a single plot with each subplot and everything works
clearplot
gset nomultiplot
gset term aqua 11
axis ([0.2,1.2,0,35], "square");
gset label 1 " A)  w/al = 3.0 " at 0.25, 27.5
x=linspace(0,1.2,35);
y=linspace(1,35,35);
[xx,yy]=meshgrid(x,y);
z=xx./(yy.*(1-xx)) - (3*yy-yy+1).*xx.^(3*yy-yy+1)./yy./(1-xx.^(3*yy-yy+1)) +
eps;
xlabel ("Sa/lambda1")
ylabel (" alpha") % no problem now as single plot
contour (x,y,z) 

gset nolabel

gset term aqua 12
axis ([0.2,1.2,0,35], "square");
gset label 2 " B)  w/al = 6.0 " at 0.25, 27.5
x=linspace(0,1.2,35);
y=linspace(1,35,35);
[xx,yy]=meshgrid(x,y);
z=xx./(yy.*(1-xx)) - (6*yy-yy+1).*xx.^(6*yy-yy+1)./yy./(1-xx.^(6*yy-yy+1)) +
eps;
xlabel ("Sa/lambda1")
ylabel (" alpha") 
contour (x,y,z) 

gset nolabel
                   
gset term aqua 13
axis ([0.2,1.2,0,35], "square");
gset label 3 " C)  w/al = 9.0 " at 0.25, 27.5
x=linspace(0,1.2,35);
y=linspace(1,35,35);
[xx,yy]=meshgrid(x,y);
z=xx./(yy.*(1-xx)) - (9*yy-yy+1).*xx.^(9*yy-yy+1)./yy./(1-xx.^(9*yy-yy+1)) +
eps;
xlabel ("Sa/lambda1")
ylabel (" alpha") 
contour (x,y,z) 

gset nolabel

gset term aqua 14
axis ([0.2,1.2,0,35], "square");
gset label 4 " D)  w/al = 12.0 " at 0.25, 27.5
x=linspace(0,1.2,35);
y=linspace(1,35,35);
[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) 


Attachment: Fig1Old.pdf
Description: Binary data

Attachment: Fig1.m
Description: Binary data


reply via email to

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