Box On/Off?

Hello NG,

    I am sorry for the possible stupid question. Does it make any sense to
ask if it's possible to define in matplotlib a Matlab-like command:

box on

or:

box off

In order to draw/undraw the axes bounding box?

Thanks in advance.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77

I just upgraded my Matplotlib to 0.86.2. The display of text using latex
has really poor resolution. This was not the case with 0.83. Anyone know
what Is the problem. The saved .eps files when converted to pdf have good
resolution.

I am using Mac OS X 10.4.4
I have latex installed with
ghostscript 8.51
dvips(k) 5.95b
numpy 0.9.5
WXAgg
wxwindows 2.6.2.1

the following relevant rc settings

font.latex.package : type1cm
text.usetex : True #
text.tex.engine : latex

figure.dpi : 100
savefig.dpi : 100

changing the dpi just makes the window bigger with still poor rendering.

when I run the example cookbook
http://new.scipy.org/Wiki/Cookbook/Matplotlib/UsingTex

I get the following on screen display

tex_demo.png

Try setting your ps.distiller.res rc setting to 6000. Does that help? If so,
let me know and I will make a comment on the wiki.

Darren

···

On Friday 03 February 2006 18:25, Samuel M. Smith wrote:

I just upgraded my Matplotlib to 0.86.2. The display of text using latex
has really poor resolution. This was not the case with 0.83. Anyone know
what Is the problem. The saved .eps files when converted to pdf have
good
resolution.

I am using Mac OS X 10.4.4
I have latex installed with
ghostscript 8.51
dvips(k) 5.95b
numpy 0.9.5
WXAgg
wxwindows 2.6.2.1

the following relevant rc settings

font.latex.package : type1cm
text.usetex : True #
text.tex.engine : latex

figure.dpi : 100
savefig.dpi : 100

changing the dpi just makes the window bigger with still poor rendering.

when I run the example cookbook
http://new.scipy.org/Wiki/Cookbook/Matplotlib/UsingTex

I get the following on screen display

--
Darren S. Dale, Ph.D.
Cornell High Energy Synchrotron Source
Cornell University
200L Wilson Lab
Rt. 366 & Pine Tree Road
Ithaca, NY 14853

dd55@...163...
office: (607) 255-9894
fax: (607) 255-9001

These are my ps backend settings
I tried False, Ghostscript, and xpdf for the ps.usedistiller but no change in the onscreen output
in every case ps.distiller.res was set to 6000

# ps backend params
ps.papersize : letter # executive, letter, legal, ledger, A0-A10, B0-B6, C0-C6
ps.useafm : False # use of afm fonts -- breaks mathtext but results in small files
ps.usedistiller : xpdf # can be: None, ghostscript or xpdf
                                           # Experimental: may produce smaller files.
                                           # xpdf intended for production of publication quality files,
                                           # but requires ghostscript, xpdf and ps2eps
ps.distiller.res : 6000 # dpi

I set verbose level to debug.
Here is the console output when I run the tex demo.
It seems that it is not using a tex font on screen even though usetex is true. It appears to use a tex font in the eps file

I get this output
numerix numpy 0.9.5.2006
font search path ['/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib-0.86.2cvs-py2.4-macosx-10.4-ppc.egg/matplotlib/mpl-data']
trying fontname /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib-0.86.2cvs-py2.4-macosx-10.4-ppc.egg/matplotlib/mpl-data/Vera.ttf
$HOME=/Users/smithsm
CONFIGDIR=/Users/smithsm/.matplotlib
loaded ttfcache file /Users/smithsm/.matplotlib/ttffont.cache
matplotlib data path /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib-0.86.2cvs-py2.4-macosx-10.4-ppc.egg/matplotlib/mpl-data
backend WXAgg version 2.6.2.1
         findfont failed New Century Schoolbook
         findfont failed Century Schoolbook L
         findfont failed Utopia
         findfont failed ITC Bookman
         findfont failed Bookman
         findfont found Bitstream Vera Serif, normal, normal 500, normal, 16.0
findfont returning /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib-0.86.2cvs-py2.4-macosx-10.4-ppc.egg/matplotlib/mpl-data/VeraSe.ttf
         findfont failed New Century Schoolbook
         findfont failed Century Schoolbook L
         findfont failed Utopia
         findfont failed ITC Bookman
         findfont failed Bookman
         findfont found Bitstream Vera Serif, normal, normal 500, normal, 12.0
findfont returning /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib-0.86.2cvs-py2.4-macosx-10.4-ppc.egg/matplotlib/mpl-data/VeraSe.ttf

This is dvips(k) 5.95b Copyright 2005 Radical Eye Software (www.radicaleye.com)
' TeX output 2006.02.03:1330' -> /tmp/1d2e640b7c7d6320cb57dd91740b0da8.ps
<tex.pro><psfrag.pro><texps.pro><special.pro><color.pro>. <cmti10.pfb>
<cmbx10.pfb><cmmi10.pfb><cmsy10.pfb><cmr8.pfb><cmmi8.pfb><cmex10.pfb>
<cmsy8.pfb><cmr10.pfb>[1<1d2e640b7c7d6320cb57dd91740b0da8.eps>]

here is a pdf of the eps file

tex_demo.pdf (26.8 KB)

···

On 03 Feb, 2006, at 16:43, Darren Dale wrote:

Try setting your ps.distiller.res rc setting to 6000. Does that help? If so,
let me know and I will make a comment on the wiki.

Darrel,

I this other thread you mention recent changes to the tex font handling. I am assuming that these are not in the 0.86.2 distribution?
Is this related to my poor resolution problem?

···

I made some improvements to the usetex option over the last few days in order
to make font selection fit seemlessly with the rest of Matplotlib. The usetex
option will now respect the serif, sans-serif, monospace, and cursive rc
settings. Usetex looks until it finds a latex-compatible font, or defaults to
computer modern. Proper font support with plainTeX is more difficult, and
everyone seems to use the latex backend anyway, so I am dropping support of
the tex engine. With these changes, the font.latex.package and the
text.tex.engine rc settings are no longer needed, and should be removed from
ones personal matplotlibrc file.