Re: [Matplotlib-users] Fwd: Help with c++ embedding

2007-11-27 Thread Christopher Barker
J.D. Herron wrote: > The application itself is actually a legacy app whose GUI is done with > WTL (windows template library) which is a thin veneer on top of the > windows API. Darn. > I have matplotlib set to use wxAgg as the backend. I'm > not inclined to rebuild the entire app with a dif

[Matplotlib-users] Fwd: Help with c++ embedding

2007-11-27 Thread J.D. Herron
Thanks for your replies, The application itself is actually a legacy app whose GUI is done with WTL (windows template library) which is a thin veneer on top of the windows API. I have matplotlib set to use wxAgg as the backend. I'm not inclined to rebuild the entire app with a different GUI tool

Re: [Matplotlib-users] Adjust width between subplots

2007-11-27 Thread John Hunter
On Nov 27, 2007 1:56 PM, Tom Johnson <[EMAIL PROTECTED]> wrote: > > Use the subplots_adjust paramters, eg > > fig.subplots_adjust(hspace=0) > This wasn't working for me... Oh, I was assuming you wanted to adjust the space between two subplots stacked one over another. For side-by-side, use wsp

Re: [Matplotlib-users] Adjust width between subplots

2007-11-27 Thread Tom Johnson
Doh! Sorry, I adjusted the wrong space. On Nov 27, 2007 11:56 AM, Tom Johnson <[EMAIL PROTECTED]> wrote: > On Nov 27, 2007 11:48 AM, John Hunter <[EMAIL PROTECTED]> wrote: > > Use the subplots_adjust paramters, eg > > > > fig.subplots_adjust(hspace=0) > > > > This wasn't working for me... > > fro

Re: [Matplotlib-users] Adjust width between subplots

2007-11-27 Thread Tom Johnson
On Nov 27, 2007 11:48 AM, John Hunter <[EMAIL PROTECTED]> wrote: > Use the subplots_adjust paramters, eg > > fig.subplots_adjust(hspace=0) > This wasn't working for me... from pylab import * f = gcf() f.subplots_adjust(hspace=0) f.add_subplot(121) f.add_subplot(122) show() Adjusting the space af

Re: [Matplotlib-users] Adjust width between subplots

2007-11-27 Thread John Hunter
On Nov 27, 2007 1:46 PM, Tom Johnson <[EMAIL PROTECTED]> wrote: > I'd like to make the separation distance between two subplots to be > much smaller. How can I achieve this? Use the subplots_adjust paramters, eg fig.subplots_adjust(hspace=0) JDH -

[Matplotlib-users] Adjust width between subplots

2007-11-27 Thread Tom Johnson
I'd like to make the separation distance between two subplots to be much smaller. How can I achieve this? - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.co

Re: [Matplotlib-users] Help with c++ embedding

2007-11-27 Thread Christopher Barker
John Hunter wrote: > > Ew, that looks really dangerous. For starters, I would never try > > to do this using pylab, exactly. the question is -- what GUItoolkit are you using with C++? hopefully it is wx or qt (you'd be using C with GTK, right?). If so, then use the appropriate back-end,

Re: [Matplotlib-users] Help with c++ embedding

2007-11-27 Thread John Hunter
On Nov 27, 2007 12:10 PM, J.D. Herron <[EMAIL PROTECTED]> wrote: > > > Hello, > > I'm using boost python to run python embedded in a C++ application on > windows. I would like to be able to have the scripts that run in this > embedded environment be able to display matplotlib plots. I have search

Re: [Matplotlib-users] Grid Display

2007-11-27 Thread Rich Shepard
On Tue, 27 Nov 2007, Anthony Floyd wrote: > Check the class library documentation for the axes() object. > http://matplotlib.sourceforge.net/matplotlib.axes.html Anthony, I've looked at this but didn't absorb it all. Now I'll spend more time with it. > Your best bet is really to explore the

Re: [Matplotlib-users] Grid Display

2007-11-27 Thread Rich Shepard
On Tue, 27 Nov 2007, Eric Firing wrote: > Or just keep track of the axes object when it is created. In > embedding_in_wx.py: > >def plot_data(self): ># Use ths line if using a toolbar >a = self.fig.add_subplot(111) > > "a" is the axes instance. Eric, Thanks. I had not pic

Re: [Matplotlib-users] Grid Display

2007-11-27 Thread Rich Shepard
On Tue, 27 Nov 2007, Michael Droettboom wrote: > You can get the axes through the Figure instance. (I don't know how you have > your embedding set up, but if it's something like embedding_in_wx.py, there's > the line "self.fig = Figure((9, 8), 75)", so self.fig is a Figure instance). Thanks

[Matplotlib-users] Help with c++ embedding

2007-11-27 Thread J.D. Herron
Hello, I'm using boost python to run python embedded in a C++ application on windows. I would like to be able to have the scripts that run in this embedded environment be able to display matplotlib plots. I have searched in vain for information on the nuances of running matplotlib pylab plots in

Re: [Matplotlib-users] Grid Display

2007-11-27 Thread Anthony Floyd
>Ah, now I see the syntax for using axes(). However, if I'm embedding the > plots in a wxPython panel, I'm not using pylab. In this environment I also > haven't yet figured out how to add axis labels or specify the range of each > axis. Within pylab on stand-alone test apps it works fine. Chec

Re: [Matplotlib-users] Grid Display

2007-11-27 Thread Eric Firing
Michael Droettboom wrote: > > You can get the axes through the Figure instance. (I don't know how you > have your embedding set up, but if it's something like > embedding_in_wx.py, there's the line "self.fig = Figure((9, 8), 75)", so > self.fig is a Figure instance). > >self.fig.gca() #

Re: [Matplotlib-users] Grid Display

2007-11-27 Thread Michael Droettboom
Rich Shepard wrote: > On Tue, 27 Nov 2007, Michael Droettboom wrote: > >> Yes. You can do >> >> from pylab import * >> ... >> axes().grid(True) # For both axes >> axes().xaxis.grid(True) # Just x >> axes().yaxis.grid(True) # Just y >> >> Rather than just an on/off boolean

Re: [Matplotlib-users] Colormap for LineCollection

2007-11-27 Thread Eric Firing
Tom, Have you looked at line_collection2.py in the examples directory of the distribution (or svn)? I think it illustrates what you want to do. Eric Tom Johnson wrote: > I would like to plot a set of lines where the color of each line is > parametrized. Then I want to add a colorbar to the pl

Re: [Matplotlib-users] Grid Display

2007-11-27 Thread Rich Shepard
On Tue, 27 Nov 2007, Michael Droettboom wrote: > Yes. You can do > > from pylab import * > ... > axes().grid(True) # For both axes > axes().xaxis.grid(True) # Just x > axes().yaxis.grid(True) # Just y > > Rather than just an on/off boolean, you can also provide line

Re: [Matplotlib-users] Grid Display

2007-11-27 Thread Michael Droettboom
Yes. You can do from pylab import * ... axes().grid(True) # For both axes axes().xaxis.grid(True) # Just x axes().yaxis.grid(True) # Just y Rather than just an on/off boolean, you can also provide line styles: axes().grid(color='r', linestyle='-',

[Matplotlib-users] Grid Display

2007-11-27 Thread Rich Shepard
Two questions relating to the display of grid lines in a plot: 1) Can this be controlled programmatically rather than from within ~/.matplotlib/matplotlibrc? 2) Is there a way to display horizontal grid lines without vertical grid lines? Pointers to the docs where these questions are

Re: [Matplotlib-users] Wanted: recommendations on embedding matplotlib in a wxPython application

2007-11-27 Thread C M
On Nov 27, 2007 11:27 AM, Rich Shepard <[EMAIL PROTECTED]> wrote: > On Mon, 26 Nov 2007, C M wrote: > > > Basically what I did (sorry if this is too basic, but I'm pretty new to > > this and this may jog others to correct deficiencies in this simple > > approach) was to: > > This is all straight

Re: [Matplotlib-users] Wanted: recommendations on embedding matplotlib in a wxPython application

2007-11-27 Thread Rich Shepard
On Mon, 26 Nov 2007, C M wrote: > Basically what I did (sorry if this is too basic, but I'm pretty new to > this and this may jog others to correct deficiencies in this simple > approach) was to: This is all straightforward and clear. The one statement I've not yet understood is this: >

Re: [Matplotlib-users] After saving in GUI, how can I get the oo-interface?

2007-11-27 Thread Arnar Flatberg
Thanks, Mark and John, I will look into a trunk version of matplotlib when I get to a chance. BTW, as far as I recall, I had the same troubles with Ubuntu Gutsy (runs v. 0.90.1). Arnar On Nov 24, 2007 4:25 PM, John Hunter <[EMAIL PROTECTED]> wrote: > On Nov 23, 2007 2:00 PM, Mark Bakker <[EMAIL

Re: [Matplotlib-users] py2exe problem

2007-11-27 Thread Werner F. Bruhin
Hi Jeff, Jeff Peery wrote: Hello, I've been using matplotlib 0.87 and I upgraded to 0.91. I ran my setup script for py2exe which had been working flawlessly and now I get an error stating that the .../mpl-data/fonts is not a regular file or doesn't exist. I checked the filename path and it do