[Matplotlib-users] editor ?
I was just wondering if there is any editor for the figures done in matplotlib. I mean something like the matlab(TM) figure or esayplot for QToctave. Since I use a software that use embedded matplotlib and after having the plot it could be very helpful to have somthing that can help tweaking the figure without using command line Thanks in advance for every hints/suggestion Giorgio- 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] Using non ascii characters
Hi, I would like to use non ascii characters in title and label but with my current intallation it does not work properly. There's no warning or error messages when I set a title with some non ascii characters (I use iso-88599-1 characters, like é or à), but I get a empty square instead of theses characters in the figure. I'm using matplotlib-0.90.1. Is there anything to configure to handle non ascii characters ? Regards, -- BL - 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] Bug in pylab?
On Thursday 17 January 2008 09:05:53 am Michael Droettboom wrote: Darren Dale wrote: On Wednesday 16 January 2008 08:22:45 am Michael Droettboom wrote: But reading Darren's new bug report makes me wonder if my fix was correct. To be honest, I'm a little confused by the bug report, not out of any lack of clarity on Darren's part, but I think due to insufficient understanding of the problem. As assumption about the purpose of cla is that is should return the plot to a pristine state -- and in this case that means linear axes. But are you suggesting that sometimes that is not the case? If you have hold=True, and the x or y scale is log, repeated calls to plot() will add new lines to the plot without changing the scaling. If hold is instead False, one might reasonably expect that future calls to plot would replace the old line with the new one, again without changing the scaling. That would be consistent. Instead, the scaling changes. That indeed is a problem. I suspect it has something to do with the extra step that log scales do to round to the nearest decade. I can have a look when I get a chance, or let me know if you'd like to tackle it, Darren. I don't know when I would have a chance to look into this (my wife and I are trying to buy a house). Darren - 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] Using non ascii characters
This probably depends on the backend you are using. Which backend and on which platform are you having trouble with? 0.90.1 had a number of Unicode and non-ascii problems that 0.91.2 resolves. You may want to try that. Failing that, can you attach a small script that exhibits the problem? There may be all kinds of things going wrong, from the encoding of the source file, to an incorrect font etc. and an example would help us narrow it down. Cheers, Mike BL wrote: Hi, I would like to use non ascii characters in title and label but with my current intallation it does not work properly. There's no warning or error messages when I set a title with some non ascii characters (I use iso-88599-1 characters, like é or à), but I get a empty square instead of theses characters in the figure. I'm using matplotlib-0.90.1. Is there anything to configure to handle non ascii characters ? Regards, -- BL - 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 -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA - 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] Using non ascii characters
I'm using a basic Debian Etch distribution. I've attached a very simple file showing the problem. On my computer, neither the title, nor the legend are displayed correctly, and I've got square instead of each non ascii characters. The attached script gives me the following informations : matplotlib : 0.90.1 backend: TkAgg encoding : UTF-8 I will try to install a SVN version of matplotlib and see if this works better. #! /usr/bin/python # -*-coding: utf-8-*- from numpy import arange import pylab as p import matplotlib import sys print matplotlib : , matplotlib.__version__ print backend: , matplotlib.get_backend() print encoding : , sys.getfilesystemencoding() x = arange(10) y = x**2-x+4 p.plot(x, y, 'ro-', label=r'polynôme') p.title(r'à é ï ù') p.xlabel('x') p.legend() p.show() - 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] Set figure of graph1 to another figure from existing graph2
Hi everyone, I've been trying to solve this problem for the last few days without success. I am afraid that part of the problem is my own lack of understanding of matplotlib/wx's inner workings, this is my first attempt to a GUI-tool. I am using th networkx (https://networkx.lanl.gov/wiki) package to generate a graph, this graph is according to the API a pylab friendly function that will use the current pylab figure axes (e.g. subplot). I want to embed this graph in the wx main application window. I've been trying to do this using the wxmpl-package (http://agni.phys.iit.edu/~kmcivor/wxmpl/) which creates a wx.Panel containing a matplotlib.Figure. What I cant manage to do is to get the networkx-graph (figure? subplot?) into the panel created by wxmpl. What _does_ work is getting an embedded matplot-graph into the wxPanel however I cant get the figure created by networkx to be drawn there instead of an empty one. I think using the set_figure() function would be a obvious way to do it, but I can't get it to work. I realise that the problem might not be related to matplotlib at all but I was hoping someone could give me help/pointers to a solution. I attatched an .py example that shows what I am trying to do (you will need wx, matplotlib, wxmpl and networkx). Thanks! #example.py import wx import pylab as P import networkx as NX import wxmpl as wxmpl class MainWindow(wx.Frame): def __init__(self,parent,id,title): wx.Frame.__init__(self,parent,wx.ID_ANY, title, wx.DefaultPosition, wx.Size(800,600)) #Layout vbox = wx.BoxSizer(wx.VERTICAL) gpanel = wxmpl.PlotPanel(self, -1) vbox.Add(gpanel, 1, wx.EXPAND | wx.ALL, 10) hbox = wx.BoxSizer(wx.HORIZONTAL) hbox.Add(wx.Button(self, 10, 'Quit'), 0, wx.LEFT, 10) self.Bind(wx.EVT_BUTTON, self.OnQuit, id=10) vbox.Add(hbox, 0, wx.BOTTOM | wx.EXPAND, 10) fig = MakeGraph() Gtmp = gpanel.get_figure() Gtmp.set_figure(fig.GFig) #P.show() self.SetSizer(vbox) def OnQuit(self, event): self.Close() class TestApp(wx.App): def OnInit(self): frame = MainWindow(None, -1, 'App') frame.Show(True) frame.Centre() return True class MakeGraph: def __init__(self): self.Graph = NX.Graph() self.Graph.add_edge(1,2) self.Graph.add_edge(1,3) self.Graph.add_edge(2,3) self.DrawGraph() def DrawGraph(self): pos = NX.spectral_layout(self.Graph) NX.draw_networkx_nodes(self.Graph, pos, node_size=400) NX.draw_networkx_edges(self.Graph, pos, width=2) NX.draw_networkx_labels(self.Graph, pos, font_size=10, font_family='sans-serif') P.xticks([]) #no x-axis P.yticks([]) #no y-axis self.GFig = P.gcf() app = TestApp(0) app.MainLoop() - 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