Re: [Matplotlib-users] (no subject)
Il 27 marzo 2012 05:08, Dorm Eight dormei...@yahoo.com ha scritto: hi, everybody! when I run my script, why there is no figure show up? I downloaded the demos from matplotlib gallery and it didn't work either. x=np.arange(100) y=x**2+3*x-1 pl.plot(x,y) [matplotlib.lines.Line2D object at 0x2581050] pl.show() there is no error, no figure pop-up! Thank you for any answer! Hi Dorm If you can send more info about the operating system and matplotlib version, it's easier to help you (for the latter do import matplotlib print matplotlib.__version__ ) Cheers, Francesco -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Display problem on CentOS
I had the same problem on Debian. Editing the matplotlibrc (should be installed somewhere in your systeme) and changing the backend variable to Qt4Agg did the trick. On Tue, Mar 27, 2012 at 12:14 AM, Magician f_magic...@mac.com wrote: Hi. I want to install Matplotlib from source code on CentOS. I've been using Matplotlib for a year. But this is the first time for me to install CentOS by myself. I installed CentOS 6.2 in basic install option. Next, I installed NumPy and Matplotlib. .matplotlibrc isn't set. It looks successfully installed, but when I type show() command, nothing appears. I can export PNG image by using savefig() command, so maybe I'm using invalid backend. How can I display plots with show() command? Magician -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Escaping in matplotlib.font_manager.findfont('sans\\-serif')
Hi Michael, I was playing with python directly, so: $ python Python 2.7.2 (default, Mar 10 2012, 02:39:52) [GCC 4.5.3] on linux2 Type help, copyright, credits or license for more information. from matplotlib import font_manager font_manager.path '/home/mmokrejs/.fonts' font_manager.rcParams {'axes.formatter.use_locale': False, 'figure.subplot.right': 0.9, 'mathtext.cal': 'cursive', 'font.fantasy': ['Comic Sans MS', 'Chicago', 'Charcoal', 'ImpactWestern', 'fantasy'], 'xtick.minor.pad': 4, 'tk.pythoninspect': False, 'image.aspect': 'equal', 'font.cursive': ['Apple Chancery', 'Textile', 'Zapf Chancery', 'Sand', 'cursive'], 'figure.subplot.hspace': 0.2, 'keymap.fullscreen': 'f', 'examples.directory': '/usr/share/doc/matplotlib-1.1.0/examples', 'xtick.direction': 'in', 'axes.facecolor': 'w', 'mathtext.fontset': 'cm', 'ytick.direction': 'in', 'keymap.pan': 'p', 'path.snap': True, 'axes.axisbelow': False, 'lines.markersize': 6, 'figure.dpi': 80, 'text.usetex': False, 'image.origin': 'upper', 'patch.edgecolor': 'k', 'legend.labelspacing': 0.5, 'ps.useafm': False, 'mathtext.bf': 'serif:bold', 'lines.solid_joinstyle': 'round', 'font.monospace': ['Bitstream Vera Sans Mono', 'DejaVu Sans Mono', 'Andale Mono', 'Nimbus Mono L', 'Courier New', 'Courier', 'Fixed', 'Terminal', 'monospace '], 'xtick.minor.size': 2, 'axes.formatter.limits': [-7, 7], 'figure.subplot.wspace': 0.2, 'savefig.edgecolor': 'w', 'image.cmap': 'jet', 'lines.marker': 'None', 'tk.window_focus': False, 'backend.qt4': 'PyQt4', 'font.serif': ['Bitstream Vera Serif', 'DejaVu Serif', 'New Century Schoolbook', 'Century Schoolbook L', 'Utopia', 'ITC Bookman', 'Bookman', 'Nimbus Roman No9 L', 'Times New Roman', 'Times', 'Palatino', 'Charter', 'serif'], 'savefig.facecolor': 'w', 'ytick.minor.size': 2, 'font.stretch': 'normal', 'text.dvipnghack': None, 'ytick.color': 'k', 'svg.fonttype': 'path', 'lines.linestyle': '-', 'xtick.color': 'k', 'xtick.major.pad': 4, 'patch.facecolor': 'b', 'figure.figsize': [8.0, 6.0], 'axes.linewidth': 1.0, 'keymap.zoom': 'o', 'legend.handletextpad': 0.8, 'mathtext.fallback_to_cm': True, 'lines.linewidth': 1.0, 'savefig.dpi': 100, 'verbose.fileo': 'sys.stdout', 'svg.image_noscale': False, 'docstring.hardcopy': False, 'font.size': 12, 'ps.fonttype': 3, 'path.simplify': True, 'key map.all_axes': 'a', 'polaraxes.grid': True, 'text.hinting': True, 'pdf.compression': 6, 'grid.linewidth': 0.5, 'legend.frameon': True, 'figure.autolayout': False, 'figure.facecolor': '0.75', 'ps.usedistiller': False, 'legend.isaxes': True, 'figure.edgecolor': 'w', 'mathtext.tt': 'monospace', 'contour.negative_linestyle': 'dashed', 'image.interpolation': 'bilinear', 'lines.markeredgewidth': 0.5, 'keymap.home': ['h', 'r', 'home'], 'axes3d.grid': True, 'axes.edgecolor': 'k', 'legend.shadow': False, 'axes.titlesize': 'large', 'backend': 'GTKAgg', 'xtick.major.size': 4, 'keymap.xscale': ['k', 'L'], 'legend.fontsize': 'large', 'lines.solid_capstyle': 'projecting', 'mathtext.it': 'serif:italic', 'keymap.save': 's', 'font.variant': 'normal', 'toolbar': 'toolbar2', 'xtick.labelsize': 'medium', 'axes.unicode_minus': True, 'ps.distiller.res': 6000, 'axes.labelweight': 'normal', 'pdf.fonttype': 3, 'patch.linewidth': 1.0, 'pdf.inheritcolor': False, 'axes.color_cycle': ['b', 'g', 'r', 'c', 'm', 'y' , 'k'], 'lines.dash_capstyle': 'butt', 'lines.color': 'b', 'figure.subplot.top': 0.9, 'pdf.use14corefonts': False, 'legend.markerscale': 1.0, 'patch.antialiased': True, 'font.style': 'normal', 'keymap.forward': ['right', 'v'], 'backend_fallback': True, 'legend.fancybox': False, 'grid.linestyle': ':', 'savefig.extension': 'auto', 'text.color': 'k', 'mathtext.rm': 'serif', 'legend.loc': 'upper right', 'interactive': False, 'cairo.format': 'png', 'savefig.orientation': 'portrait', 'svg.image_inline': True, 'ytick.major.size': 4, 'axes.grid': False, 'plugins.directory': '.matplotlib_plugins', 'grid.color': 'k', 'timezone': 'UTC', 'ytick.major.pad': 4, 'legend.borderpad': 0.4, 'examples.download': False, 'lines.dash_joinstyle': 'round', 'datapath': '/usr/share/matplotlib/mpl-data', 'lines.antialiased': True, 'text.latex.unicode': False, 'legend.handleheight': 0.7, 'image.lut': 256, 'figure.subplot.bottom': 0.1, 'text.latex.preamble': [''], 'legend.numpoints': 2, 'legend.handlelength': 2.0, 'keymap.grid': 'g', 'font.sans-serif': ['Bitstream Vera Sans', 'DejaVu Sans', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', 'sans-serif'], 'axes.labelcolor': 'k', 'font.family': 'sans-serif', 'axes.labelsize': 'medium', 'ytick.minor.pad': 4, 'legend.borderaxespad': 0.5, 'mathtext.sf': 'sans\\-serif', 'axes.hold': True, 'verbose.level': 'silent', 'mathtext.default': 'it', 'figure.subplot.left': 0.125, 'legend.columnspacing': 2.0, 'text.latex.preview': False, 'font.weight': 'normal', 'keymap.yscale': 'l', 'image.resample': False, 'agg.path.chunksize': 0, 'path.simplify_threshold':
Re: [Matplotlib-users] Display problem on CentOS
Thank you, Alexis. I try to install PyQt4 and set Qt4Agg just now, but nothing displayed. Ummm...what's wrong...?? Magician On 2012/03/27, at 17:05, Alexis Praga wrote: I had the same problem on Debian. Editing the matplotlibrc (should be installed somewhere in your systeme) and changing the backend variable to Qt4Agg did the trick. On Tue, Mar 27, 2012 at 12:14 AM, Magician f_magic...@mac.com wrote: Hi. I want to install Matplotlib from source code on CentOS. I've been using Matplotlib for a year. But this is the first time for me to install CentOS by myself. I installed CentOS 6.2 in basic install option. Next, I installed NumPy and Matplotlib. .matplotlibrc isn't set. It looks successfully installed, but when I type show() command, nothing appears. I can export PNG image by using savefig() command, so maybe I'm using invalid backend. How can I display plots with show() command? Magician -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Display problem on CentOS
You can check you are editing the correct configuration file with (in the Python shell) : import matplotlib matplotlib.matplotlib_fname() You can also try other backends. For a list, see : http://matplotlib.sourceforge.net/faq/usage_faq.html#what-is-a-backend On Tue, Mar 27, 2012 at 2:46 PM, Magician f_magic...@mac.com wrote: Thank you, Alexis. I try to install PyQt4 and set Qt4Agg just now, but nothing displayed. Ummm...what's wrong...?? Magician On 2012/03/27, at 17:05, Alexis Praga wrote: I had the same problem on Debian. Editing the matplotlibrc (should be installed somewhere in your systeme) and changing the backend variable to Qt4Agg did the trick. On Tue, Mar 27, 2012 at 12:14 AM, Magician f_magic...@mac.com wrote: Hi. I want to install Matplotlib from source code on CentOS. I've been using Matplotlib for a year. But this is the first time for me to install CentOS by myself. I installed CentOS 6.2 in basic install option. Next, I installed NumPy and Matplotlib. .matplotlibrc isn't set. It looks successfully installed, but when I type show() command, nothing appears. I can export PNG image by using savefig() command, so maybe I'm using invalid backend. How can I display plots with show() command? Magician -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Display problem on CentOS
On 03/26/2012 12:14 PM, Magician wrote: Hi. I want to install Matplotlib from source code on CentOS. I've been using Matplotlib for a year. But this is the first time for me to install CentOS by myself. I installed CentOS 6.2 in basic install option. Next, I installed NumPy and Matplotlib. .matplotlibrc isn't set. It looks successfully installed, but when I type show() command, nothing appears. I can export PNG image by using savefig() command, so maybe I'm using invalid backend. It sounds like the problem is that you installed mpl without having installed the dependencies for any of the interactive backends. See http://matplotlib.sourceforge.net/users/installing.html Eric How can I display plots with show() command? Magician -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] zooming with transforms
What is the most effective approach to perform a 'zoom under mouse cursor'? Currently I use the following code (considering g as mpl.Axes), but set_xlim() is called twice. Is there a better approach? code # First zoom result = \ g.bbox.shrunk(DEFAULT_ZOOM_FACTOR,1).transformed(g.transData.inverted()) g.set_xlim(*result.intervalx) # Get the new location of initial event b = g.transData.transform_point([event.xdata, 0]) # Then replace the original location under the mouse cursor result = \ g.bbox.translated(-(event.x-b[0]),0).transformed(g.transData.inverted()) g.set_xlim(*result.intervalx) /code Arnaud. -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Export 3D plot to 3D file format
Ah mayavi... I find it complicated for building, and in Ubuntu repository (or launchpad) there is some old version I'll try later today to build it Thanks for your suggestion, Cheers On Tue, Mar 27, 2012 at 11:25 PM, Frédéric Vogt fv...@mso.anu.edu.auwrote: Is the savefig function what you're looking for ? http://github.enthought.com/mayavi/mayavi/auto/mlab_figure.html Note that as far as I know, the .mtl file associated with a given .obj file is not handled properly - all your colors will be white. Personally, I export in .vrml which suits my needs better, as it does handle colors in a satisfactory way. -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Export 3D plot to 3D file format
Is the savefig function what you're looking for ? http://github.enthought.com/mayavi/mayavi/auto/mlab_figure.html Note that as far as I know, the .mtl file associated with a given .obj file is not handled properly - all your colors will be white. Personally, I export in .vrml which suits my needs better, as it does handle colors in a satisfactory way. Cheers, Fréd On 27/03/2012, at 11:24 AM, klo uo wrote: Does someone maybe knows of a project that allows exporting MPL 3D plot (mpl_toolkits.mplot3d.Axes3D) to 3D file format, like OBJ, 3DS, BLEND ... any kind? -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users