I'm having two (presumably) unrelated problems with contourf

1) One of my datasets seems to trigger a bug:

Specifically when I run the appended script
(http://clouds.eos.ubc.ca/~phil/matplotlib_error/arrayplot.py)
using the pickled array:
(http://clouds.eos.ubc.ca/~phil/matplotlib_error/array.pic)
I get:
http://clouds.eos.ubc.ca/~phil/matplotlib_error/surfaceOnTop.png

but if I try to flip the pressure axis by uncommenting:

axes1.set_ylim([1000,250])

the rightside-up plot is corrupted

http://clouds.eos.ubc.ca/~phil/matplotlib_error/surfaceOnBottom.png

2) It looks like the alpha=0.25 setting for the normalized set_under/over
colormap works for the colorbar (the little triangles are transparent)
but not for the actually filled contours (the under values are
saturated black/salmon)

All of this is with the current matplotlib svn snapshot (revision 4986).
Both the top and bottom runs give the same --verbose-helpful output:

~/public_html/matplotlib_error [EMAIL PROTECTED] python  arrayplot.py 
--verbose-helpful
$HOME=/home/phil
CONFIGDIR=/home/phil/.matplotlib
matplotlib data path 
/home/phil/usr251_Centos/lib/python2.5/site-packages/matplotlib/mpl-data
loaded rc file /home/phil/.matplotlib/matplotlibrc
matplotlib version 0.98pre
verbose.level helpful
interactive is False
units is False
platform is linux2
numerix numpy 1.0.5.dev4731
Using fontManager instance from /home/phil/.matplotlib/fontManager.cache
backend Agg version v2.2
Warning: invalid value encountered in reduce
Warning: invalid value encountered in reduce

thanks in advance for any suggestions -- Phil



#--------------------
import numpy as N
import matplotlib as mpl
import pickle
mpl.use('Agg')
from pylab import figure, show, close,setp,savefig


fig1=figure(1)
fig1.clf()
axloc = [.1, .1, .67, .8]
colorbarloc = [.82, .1, .025, .8]
axes1 = fig1.add_axes(axloc)
colorbaraxes = fig1.add_axes(colorbarloc)
vmin, vmax = (-40, 20)
norm = mpl.colors.normalize(vmin = vmin, vmax = vmax)
cmap = mpl.cm.jet
cmap.set_over('black', 0.25)
cmap.set_under('salmon', 0.25)
picFile=open('array.pic','r')
plotArray=pickle.load(picFile)
picFile.close()
timeMarks=N.arange(0,9)
presslevs=N.arange(1000,200,-10)
contplot = 
axes1.contourf(timeMarks,presslevs,plotArray,N.linspace(vmin,vmax,7),
                          norm=norm,
                          extend='both',
                          cmap=cmap)
#axes1.set_ylim([1000,250])
fig1.colorbar(contplot,colorbaraxes)
labelHandle=colorbaraxes.set_ylabel('temperature (deg C)')
setp(labelHandle,'rotation',-90,'ha','left')
axes1.set_xticks(timeMarks[[0,4,8]])
axes1.set_ylabel('pressure (hPa)')
axes1.set_xlabel('Date')
axes1.set_title('LXK balloon sondes')
#savefig('surfaceOnBottom')
savefig('surfaceOnTop')


    
    

    
    
    
    
    
    
    


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to