Well, matplotlib starts with a canvas bigger than my screen (vertically only) but in the end it seems to resize it so everything fits in. I can see the whole drawing and the bottom toolbar. Again, saving in png or jpg works perfectly.... and of course I checked that gv was not cutting the graph when displaying it. I just tried to use GTK as a backend, and ipython tells me that there are "non implemented" errors on my script....
I attach it here.
thanks!
Johann

Darren Dale wrote:
On Wednesday 09 May 2007 12:19:24 pm Johann Cohen-Tanugi wrote:
I am creating a "big" drawing ( figure(figsize=(16,20)) ), and when I
try to save it in eps/ps form, it mishandle the overall size and only
save a portion of the drawing. Saving in png or jpg works fine though.
Any idea?

On my system, you cant create a figure that is larger than the monitor size, unless I use a non-gui backend like agg or ps. It doesnt matter whether I save an eps, png, or jpg. Also, make sure your postscript viewer is not truncating the page due to an inappropriate page size setting.

Darren
import numarray
from pylab import *

rc('text', usetex=True)
m=0.

#CASE 1
figure(figsize=(16,20))
subplot(311)
#title('CASE 1')

tRsh     = 1.15
gstar2  = 2 
tRemax = 1.05
tRe = numarray.arange(0.0,tRemax+0.04,0.005,numarray.Float32)

x = tRe
y = sqrt(tRe*( gstar2*((tRsh - tRe)**2 - (1-tRe)**2)   + (tRsh-tRe)*(tRsh**(m+1) - tRe**(m+1))/(m+1) ))
y[numarray.isnan(y)]=0.0
print x[-1],y[-1]
plot([-0.0,1.2],[0,0],"b",hold=False)
plot(x,y,"b",linewidth=3)
plot(x,-y,"b",linewidth=3)
text(1.,-0.05,r'$R_t$',size=26)
text(0.25,0.3,r'$R_e$',size=26)
text(0.6,0.37,r'$r$',size=26)

plot([0,x[50]],[0,y[50]],"r",hold=True)
plot([x[50],1],[y[50],0],"r",hold=True)

an=linspace(0,pi/12,10)
plot(1+0.3*cos(pi-an),0.4*gstar2*sin(an),"g")
text(0.67,0.01,r'$\theta_r$',size=26)

an=linspace(0,pi/6,10)
plot(0.15*cos(an),0.3*gstar2*sin(an),"g")
text(0.17,0.01,r'$\theta_e$',size=26)

s=linspace(-arcsin(0.099/0.75),arcsin(0.12/0.75),10)
plot(tRsh*cos(s),4*sin(s),"g--")
#s=linspace(-arcsin(0.2),arcsin(0.3),10)
#plot(tRsh*cos(s), gstar2*tRsh*sin(s),"g--")
text(1.05,0.3,r'$R_{sh}(t_t)$',size=26)

text(1.05,-0.70,'CASE 1',size=26)

#CASE 2
#figure(figsize=(16,8))
subplot(312)
Remax=1.
tRe = numarray.arange(0.0,Remax+0.001,0.001,numarray.Float32)
plot([-0.0,1.2],[0,0],"b",hold=False)
Re_gammaTheta = sqrt(tRe*(1- tRe)/(m+1)*(1.-tRe**(m+1)))
plot(tRe,Re_gammaTheta,"b",linewidth=3,hold=True)
plot(tRe,-Re_gammaTheta,"b",linewidth=3,hold=True)
plot([0,tRe[600]],[0,Re_gammaTheta[600]],"r",hold=True)
plot([tRe[600],1],[Re_gammaTheta[600],0],"r",hold=True)
#xlabel(r'$R_e$',fontsize=24)
#text(-0.15,0, r'$R_e\gamma_t\theta_e$',fontsize=24)
text(-0.15,0, r'$x_e/\gamma_t/R_t$',fontsize=24)
text(-0.15,-0.15, r'$\approx \gamma_t{\tilde{R}}_e\theta_e$',fontsize=24)
#text(-0.15,-0.15, r'$\approx \gamma_t{R}_e\theta_e$',fontsize=24)
text(1.02,-0.15,r'$R_t=R_{sh}(t_t)$',size=26)
text(0.37,0.2,r'$R_e$',size=26)
text(0.74,0.1,r'$r$',size=26)

an=linspace(0,pi/7,10)
plot(0.24*cos(an),0.24*sin(an),"g")
text(0.25,0.01,r'$\theta_e$',size=26)

an=linspace(0,pi/5,10)
plot(1+0.15*cos(pi-an),0.15*sin(an),"g")
text(0.82,0.01,r'$\theta_r$',size=26)
#plot the shell at tt
s=linspace(-arcsin(0.15/0.75),arcsin(0.15/0.75),10)
plot(1.*cos(s),1.7*sin(s),"g--")
#s=linspace(-arcsin(0.38),arcsin(0.38),10)
#plot(1.*cos(s),1.*sin(s),"g--")
text(1.05,-0.35,'CASE 2', size=26)

#CASE 3
#figure(figsize=(16,8))
subplot(313)
Remax=0.70
tRe = numarray.arange(0.0,Remax+0.001,0.001,numarray.Float32)

Re_gammaTheta = sqrt(tRe*(1- tRe)/(m+1)*(Remax**(m+1)-tRe**(m+1)))
plot(tRe,Re_gammaTheta,"b",linewidth=3,hold=False)
plot(tRe,-Re_gammaTheta,"b",linewidth=3,hold=True)
plot([0.0,1.2],[0,0],hold=True)
plot([0,tRe[100]],[0,Re_gammaTheta[100]],"r",hold=True)
plot([tRe[100],1],[Re_gammaTheta[100],0],"r",hold=True)
text(1.,-0.1,r'$R_t$',size=26)
text(0.04,0.21,r'$R_e$',size=26)
text(0.5,0.15,r'$r$',size=26)
#xlabel(r'$R_e$',fontsize=24)
xlabel(r'$z_e/R_t \approx{\tilde{R}}_e$',fontsize=24)
#xlabel(r'$z_e/R_t \approx{R}_e$',fontsize=24)
#text(-0.15,0, r'$R_e\gamma_t\theta_e$',fontsize=24)
an=linspace(0,pi/3.7,10)
plot(0.08*cos(an),0.16*sin(an),"g")
text(0.07,0.065,r'$\theta_e$',size=26)

an=linspace(0,pi/13,10)
plot(1+0.4*cos(pi-an),0.4*sin(an),"g")
text(0.55,0.005,r'$\theta_r$',size=26)
#plot the shell at tt
s=linspace(-arcsin(0.11/0.75),arcsin(0.11/0.75),10)
plot(0.95*cos(s),2*sin(s),"g--")
text(0.85,-0.15,r'$R_{sh}(t_t)$',size=26)
#theta_r,max
#plot([0,tRe[460]],[0,Re_gammaTheta[460]],"y")
#plot([tRe[460],1],[Re_gammaTheta[460],0],"y")
plot([0.4,1],[Re_gammaTheta[360],0],"y")

an=linspace(0,pi/7.2,10)
plot(1+0.2*cos(pi-an),0.2*sin(an),"y")
text(0.8,0.11,r'$\theta_{r,max}$',size=26)
text(1.05,-0.25,'CASE 3',size=26)
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to