Re: [Matplotlib-users] Scatter legend doesn't show markers
Erik Tollerud wrote: I use the scatter(x,y) command to make scatter plots, but I noticed today (on the SVN version of mpl) that when I call legend() after giving scatter(x,y,label='somelabel') , the legend doesn't show the marker symbols - it only has a square patch colored in the color that was used for the scatter plot. Is this a bug, or intended behavior? (and is there a work-around to show the marker symbols in the legend?) Hi Erik, I would say it's neither a bug nor an intended bahavior. It's just not implemented -- so you might call it a misbehaviour ;-) I too hope that this will be fixed/added, since it's an issue open some time now (I guess since scatter was implemented !?) Manuel - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Showing the plot in the specific location
On Fri, Feb 22, 2008 at 11:04 PM, sa6113 [EMAIL PROTECTED] wrote: I could return the output object of the plot as image file , would you please tell me how I have to convert image to QImage in order to use it in my GUI ? I could, but this is a very poor way to do it. First, you would not be able to interact with your figure (pan, zoom, etc). 2nd, you would be using qimage to rescale your plot with the embedded window size an this would be far inferior to having matplotlib draw into the requested size. The right way to use this is to follow the example of http://matplotlib.sourceforge.net/examples/embedding_in_qt4.py JDH - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Showing the plot in the specific location
On Saturday 23 February 2008 10:49:25 am John Hunter wrote: On Fri, Feb 22, 2008 at 11:04 PM, sa6113 [EMAIL PROTECTED] wrote: I could return the output object of the plot as image file , would you please tell me how I have to convert image to QImage in order to use it in my GUI ? I could, but this is a very poor way to do it. First, you would not be able to interact with your figure (pan, zoom, etc). 2nd, you would be using qimage to rescale your plot with the embedded window size an this would be far inferior to having matplotlib draw into the requested size. The right way to use this is to follow the example of http://matplotlib.sourceforge.net/examples/embedding_in_qt4.py Yes, please follow the example John pointed out. The qt4agg backend already provides a widget that you can embed in your program, an example is in embedding_in_qt4.py, it does the conversion to a QImage already, you dont need to reimplement it. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Pb with setupext.py - nonstandard installation of python and tk
Hi, I've got difficulties to make a local installation of matplotlib. I think it's due to my nonstandard installation of python and tk, which both are in my home. I've seen on the website that , for non standard installation, I should complete the basedir dictionary defined in the setupext.py script. But for the Tcl/Tk header files, this does not seems to work. Whatever I put in this dictionary, the module.include_dirs corresponding to Tk (line 825 of setupext.py) is always equal to ['/usr/share/include', '/usr/share/include']. Did I miss something obvious ? I'm on a linux2 platform and I''m trying make a local installation of python2.5 + matplotlib 0.91.2 in my home. Regards, -- LB - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] reversing the y-axis with contourf -- bug?
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/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users