Plotting in Individual Windows

8,586 views
Skip to first unread message

Brian

unread,
Apr 5, 2010, 6:22:43 PM4/5/10
to spyder
I've have already transitioned from Matlab to IPython and am extremely
happy with the results. I started looking at spyder and am very
impressed with its functionality and integration. I did have one
question about the plotting features though.

Typically, I tend to open many different figures in my scripts (20-50
at a time), and look through them one at a time after I've completed
processing data. This allows me to easily compare different sets of
data rather quickly. Ipython opens individual windows for each plot,
that are handled as individual windows by the operating system.
Spyder appears to keep the figures as children of its main window.
This prevents using operating system tricks to resize the plot windows
(maximize and tile commands). Is there an easy way to modify this
behavior in spyder so that each figure opens in a new window?

josef...@gmail.com

unread,
Apr 6, 2010, 1:38:16 AM4/6/10
to spyd...@googlegroups.com

I'm using standard matplotlib commands in my scripts and get the usual
independent plot windows

import matplotlib.pyplot as plt
plt.figure()
plt.plot(...)
...
plt.show() #at end of script file

I don't know (or use) yet the spyder specific plot features.

Josef

>
> --
> You received this message because you are subscribed to the Google Groups "spyder" group.
> To post to this group, send email to spyd...@googlegroups.com.
> To unsubscribe from this group, send email to spyderlib+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/spyderlib?hl=en.
>
>

Pierre Raybaut

unread,
Apr 6, 2010, 5:16:01 AM4/6/10
to spyder
There is an option for that.
Look into the "Interactive console" menu, there is a "Console
settings" entry and there should be an option (I don't remember the
exact option name) like "Dockable matplotlib figures" which is enabled
by default. Disable it should lead to the desired behaviour.

Cheers,
Pierre

Pierre Raybaut

unread,
Apr 6, 2010, 5:19:39 AM4/6/10
to spyder
On Apr 6, 7:38 am, josef.p...@gmail.com wrote:

> On Mon, Apr 5, 2010 at 6:22 PM, Brian <brian.b.ve...@gmail.com> wrote:
> > I've have already transitioned from Matlab to IPython and am extremely
> > happy with the results.  I started looking at spyder and am very
> > impressed with its functionality and integration.  I did have one
> > question about the plotting features though.
>
> > Typically, I tend to open many different figures in my scripts (20-50
> > at a time), and look through them one at a time after I've completed
> > processing data.  This allows me to easily compare different sets of
> > data rather quickly.  Ipython opens individual windows for each plot,
> > that are handled as individual windows by the operating system.
> > Spyder appears to keep the figures as children of its main window.
> > This prevents using operating system tricks to resize the plot windows
> > (maximize and tile commands).  Is there an easy way to modify this
> > behavior in spyder so that each figure opens in a new window?
>
> I'm using standard matplotlib commands in my scripts and get the usual
> independent plot windows

That's probably because you have disabled the "Dockable matplotlib
figures" option in the interactive console or because you are using
the external console.

> import matplotlib.pyplot as plt
> plt.figure()
> plt.plot(...)
> ...
> plt.show()  #at end of script file
>
> I don't know (or use) yet the spyder specific plot features.

Actually there are no specific plotting commands: Spyder is patching
matplotlib at startup (for the interactive console only) to allow
figures to be docked in the Spyder main window GUI. So even if you
reimport matplotlib in your script the way you wrote above, you are
using the patched matplotlib (as long as you are using the interactive
console of course).

Pierre

Reply all
Reply to author
Forward
0 new messages