Christopher Barker | 1 Mar 01:05
Picon
Favicon

Re: Plotting in C++

This is getting OT, but I'd kind of like to see it get archived somewhere...

João Luís Silva wrote:
> I'm trying to explore new options, and learn new skills. My favorite 
> programming languages are C/C++ and Python. I use Python for small 
> scripts and applications, and C/C++ for everything else. I've started a 
> smallish/medium size open source app in python+pygtk+matplotlib+numpy 
> (laserfoam.sf.net) but I think a large application might be more 
> maintainable in C++.

I think this is not true AT ALL -- C++ is a big 'ol mess and far too 
complicated, and not very flexible, no matter how hard it tries.

> Also, I think C++ is easier to "sell" to the powers 
> that be.

That can be quite true, depending on who the powers that be are. 
However, I like a quote from the wxPython list:

"The only difference that my users see between an app written in Python 
and C++ is that the Python one has more features...and fewer bugs."

> I may write the GUI in 
> python+wxPython, and everything else in C++,

I wouldn't write "everything else" in C++ -- I'd only write what you 
really need to write in C++ - which means only computational code that 
isn't fast enough with numpy, or device drivers or something like that.

> but I was trying to drive  the app from C++.
(Continue reading)

Jeff Peery | 1 Mar 02:16
Favicon

error in savefig with wxAgg backend

Hello,

I’m trying to use savefig in my wx app and I’m using wxAgg backend. I’m getting this error:

 

FILE …maplotlib\backends\backend_bases.py, line 397 in print_png

Self.get_renderer()._renderer.write_png(filename, self.figure.dpi.dpi.get())

TypeError: cannot return std::string from Unicode object

 

I’m simply calling this:

 

self.figure.savefig(image_file,

                            facecolor='w',

                            edgecolor='w')

 

How do I fix this problem? Thanks.

 

Jeff

 

 

 

-------------------------------------------------------------------------
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@...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
chombee | 1 Mar 15:57

Re: Show shapes on scatterplot legend?

On Fri, 2008-02-29 at 08:56 -0500, Michael Droettboom wrote:
> I don't believe there is at present.  There was a recent discussion 
> about this on the list, and it's on the radar as something to add for a 
> future release.

Oh well. Good to know it's on the radar. For now I'll just modify my
plots after the fact with the gimp.

-------------------------------------------------------------------------
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/
Alan G Isaac | 1 Mar 17:00
Picon
Favicon
Gravatar

Re: bounding box

On Fri, 29 Feb 2008, David Huard apparently wrote:
> Have you tried pdfcrop ? 

Did not know about it.
<URL:http://www.ctan.org/tex-archive/support/pdfcrop/>
Hmmm, is it legitimate to link to perl code here? ;-)

Thanks,
Alan

-------------------------------------------------------------------------
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/
Onno Broekmans | 1 Mar 17:22

Re: Matplotlib performance

JH> Note that with the clipped line approach I suggested, you can have the
JH> best of both worlds.  Downsampl when N>20000 or some appropriate
JH> number, and plot the full data when you zoom.

Hm.. Good point. I'll try to implement that. Thanks!

Best regards,

--

-- 
Onno Broekmans

-------------------------------------------------------------------------
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/
Jose Gomez-Dans | 2 Mar 02:19
Picon
Gravatar

Re: Show shapes on scatterplot legend?

Hi,

On Thu, Feb 28, 2008 at 7:45 PM, chombee <chombee-mOBtk8rjKVpiLUuM0BA3LQ@public.gmane.org> wrote:
The problem is that the legend displays only a rectangular block
indicating the color for each plot. Is there a way to get the marker
shapes of scatter plots into the legend?

I faced a similar problem some time ago, and got some help from the list:
<http://article.gmane.org/gmane.comp.python.matplotlib.general/9860>

Meaning: you can create a Patch, fill it with some colours, and stick it in the legend. It might be too much of a hassle. However, there might be an easy mapping between the marker and the patch?

J

--
Centre for Terrestrial Carbon Dynamics
Department of Geography, University College London
Gower Street, London WC1E 6BT, UK
-------------------------------------------------------------------------
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@...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
John R. Dowdle | 2 Mar 03:34
Picon

Labels for ticks on the colorbar?

Hi,

Is is possible to customize the labels for the ticks of the colorbar?  If so,
could someone please explain how this may be accomplished?

Thanks in advance,

John

-------------------------------------------------------------------------
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/
John Hunter | 2 Mar 04:44
Picon
Gravatar

Re: Labels for ticks on the colorbar?

On Sat, Mar 1, 2008 at 8:34 PM, John R. Dowdle <jrdowdle@...> wrote:
> Hi,
>
>  Is is possible to customize the labels for the ticks of the colorbar?  If so,
>  could someone please explain how this may be accomplished?

The colorbar method returns a matplotlib.colorbar.Colorbar instance,
which contains a matplotlib.axes.Axes instance named "ax" (this is the
axes of the colorbar).  I'm freestyling here, so there could be a
typo, but here is the idea:

cb = fig.colorbar(something)
for ticklabel in cb.ax.get_yticklabels():
   ticklabel.set_color('red')  # the ticklabels are
matplotlib.text.Text instances

See http://matplotlib.sf.net/matplotlib.text.html and
http://matplotlib.sf.net/matplotlib.axes.html for details on the Text
and Axes methods that are available to you.  You can set all kinds of
attributes on the Text instance (font style, fontsize, font weight,
color, etc...)

JDH

-------------------------------------------------------------------------
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/
sa6113 | 2 Mar 05:40
Picon

how load data to Image from String?


Would you please help me ?
I want to load data to Image (QImage) from String or binary String without
using PIL module .
--

-- 
View this message in context: http://www.nabble.com/how-load-data-to-Image-from-String--tp15784115p15784115.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

-------------------------------------------------------------------------
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/
linzhenhua | 2 Mar 13:31
Favicon

problem with figure toolbar

 Hello,all
      I have a problem with matplotlib. The numpy and matplotlib versions are all the newest versions
      First,if I want to plot a figure,I can type several command,finally use the show() command,everything seems well,but I have to use the Ctrl+c to stop the show() to go further.
      And I know I can use the interactive mode.So first I use ion(),then use the plot command to plot figure and draw() command to update the figure,but in this case ,the figure toolbar is not visible on the figure and I can not use it.However if I run the show() command then the figure toolbar appear and I can control the figure using the toolbar.
      I wonder whether I can take advantage of the figure toolbar and the command line at the same time or not ?
      Best wishes.
 
 

--
 


已 经 超 过 100 万 台 电 脑 安 装 了 网 易 有 道 免 费 英 汉 词 典 , 点 击 此 处 可 以 快 速 下 载
-------------------------------------------------------------------------
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@...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Gmane