SourceForge logo
SourceForge logo
Menu

matplotlib-devel

From: Dieter W. <di...@ue...> - 2010年09月27日 13:46:52
Hi,
I'm using matplotlib embedded in my wxpython application and needed to
give users a quick way to relimit a figure, for example after removing a
line from a plot. Therefore I added a button to the toolbar. Do you
think it would make sense to include this in matplotlib by default?
Appended you find modifications of backend_bases.py and
backends/backend_wx.py as well as a draft for a symbol. 
Greetings,
Dieter
From: Eric F. <ef...@ha...> - 2010年09月27日 18:28:09
On 09/27/2010 03:46 AM, Dieter Weber wrote:
> Hi,
> I'm using matplotlib embedded in my wxpython application and needed to
> give users a quick way to relimit a figure, for example after removing a
> line from a plot. Therefore I added a button to the toolbar. Do you
> think it would make sense to include this in matplotlib by default?
I don't think it would. The standard toolbar is for typical interactive 
use, where I don't think the relimit functionality is needed often 
enough to justify having its own button--if at all. Better to keep that 
toolbar simple.
Eric
> Appended you find modifications of backend_bases.py and
> backends/backend_wx.py as well as a draft for a symbol.
>
> Greetings,
> Dieter
>
>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
>
>
>
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
From: Benjamin R. <ben...@ou...> - 2010年09月27日 18:36:12
On Mon, Sep 27, 2010 at 1:27 PM, Eric Firing <ef...@ha...> wrote:
> On 09/27/2010 03:46 AM, Dieter Weber wrote:
> > Hi,
> > I'm using matplotlib embedded in my wxpython application and needed to
> > give users a quick way to relimit a figure, for example after removing a
> > line from a plot. Therefore I added a button to the toolbar. Do you
> > think it would make sense to include this in matplotlib by default?
>
> I don't think it would. The standard toolbar is for typical interactive
> use, where I don't think the relimit functionality is needed often
> enough to justify having its own button--if at all. Better to keep that
> toolbar simple.
>
> Eric
>
>
Just playing devil's advocate here...
Considering how we can now have multiple show() calls and with the upcoming
ipython looking more and more spiffy, could there be a future use case for
this toolbar button?
On the other hand, how would the inclusion of this button impact users of
other interactive scripts that have added their own buttons? I mean,
planning for the future, can it be definitively said that matplotlib will
never add anymore toolbar buttons? Could developers rely on that real
estate not being taken over by rule of "eminent domain", if you will?
Ben Root
From: Eric F. <ef...@ha...> - 2010年09月27日 18:48:22
On 09/27/2010 08:35 AM, Benjamin Root wrote:
> On Mon, Sep 27, 2010 at 1:27 PM, Eric Firing <ef...@ha...
> <mailto:ef...@ha...>> wrote:
>
> On 09/27/2010 03:46 AM, Dieter Weber wrote:
> > Hi,
> > I'm using matplotlib embedded in my wxpython application and
> needed to
> > give users a quick way to relimit a figure, for example after
> removing a
> > line from a plot. Therefore I added a button to the toolbar. Do you
> > think it would make sense to include this in matplotlib by default?
>
> I don't think it would. The standard toolbar is for typical interactive
> use, where I don't think the relimit functionality is needed often
> enough to justify having its own button--if at all. Better to keep that
> toolbar simple.
>
> Eric
>
>
> Just playing devil's advocate here...
>
> Considering how we can now have multiple show() calls and with the
> upcoming ipython looking more and more spiffy, could there be a future
> use case for this toolbar button?
>
> On the other hand, how would the inclusion of this button impact users
> of other interactive scripts that have added their own buttons? I mean,
> planning for the future, can it be definitively said that matplotlib
> will never add anymore toolbar buttons? Could developers rely on that
> real estate not being taken over by rule of "eminent domain", if you will?
>
> Ben Root
>
Ben,
I don't understand either of your questions. What's the point?
Eric
From: Benjamin R. <ben...@ou...> - 2010年09月27日 18:58:39
On Mon, Sep 27, 2010 at 1:47 PM, Eric Firing <ef...@ha...> wrote:
> On 09/27/2010 08:35 AM, Benjamin Root wrote:
> > On Mon, Sep 27, 2010 at 1:27 PM, Eric Firing <ef...@ha...
> > <mailto:ef...@ha...>> wrote:
> >
> > On 09/27/2010 03:46 AM, Dieter Weber wrote:
> > > Hi,
> > > I'm using matplotlib embedded in my wxpython application and
> > needed to
> > > give users a quick way to relimit a figure, for example after
> > removing a
> > > line from a plot. Therefore I added a button to the toolbar. Do
> you
> > > think it would make sense to include this in matplotlib by
> default?
> >
> > I don't think it would. The standard toolbar is for typical
> interactive
> > use, where I don't think the relimit functionality is needed often
> > enough to justify having its own button--if at all. Better to keep
> that
> > toolbar simple.
> >
> > Eric
> >
> >
> > Just playing devil's advocate here...
> >
> > Considering how we can now have multiple show() calls and with the
> > upcoming ipython looking more and more spiffy, could there be a future
> > use case for this toolbar button?
> >
> > On the other hand, how would the inclusion of this button impact users
> > of other interactive scripts that have added their own buttons? I mean,
> > planning for the future, can it be definitively said that matplotlib
> > will never add anymore toolbar buttons? Could developers rely on that
> > real estate not being taken over by rule of "eminent domain", if you
> will?
> >
> > Ben Root
> >
>
> Ben,
>
> I don't understand either of your questions. What's the point?
>
> Eric
>
>
First, I am asking if there are no use-cases for this button in the future
with the advent of an improved ipython environment? In other words, more
people may use matplotlib+ipython like a regular MATLAB environment. Could
this button be a useful feature later?
Second, irregardless of whether this button is included or not, there have
been app developers who have added buttons to the toolbar for their own
use. Can these developers count on that real estate to always be free? Can
we definitively say that matplotlib will never have more buttons added to
its default toolbar?
Does that make more sense?
Ben Root
From: John H. <jd...@gm...> - 2010年09月27日 19:05:51
On Mon, Sep 27, 2010 at 1:57 PM, Benjamin Root <ben...@ou...> wrote:
> Second, irregardless of whether this button is included or not, there have
> been app developers who have added buttons to the toolbar for their own
> use. Can these developers count on that real estate to always be free? Can
> we definitively say that matplotlib will never have more buttons added to
> its default toolbar?
On a different but related topic, I think it would definitely be
desirable to support customizable toolbars, so users could easily add
their own buttons, remove buttons, connect them to their own
callbacks, etc... That would take a bit of work to handle this across
GUIS and platforms with icon specifications, etc, but would certainly
be useful. Adding one more button for a somewhat specialized use case
is definitely not a good idea, as only a tiny faction of users
actually modify data in objects in place.
A related button to autoscale y after zoom based on current x limits
would be somewhat handy in my own experience, but again, I'd rather
have customizable toolbars with a stock functionality that we could
add or remove as desired.
JDH
From: Amit A. <aro...@gm...> - 2010年09月27日 19:38:00
On Mon, Sep 27, 2010 at 8:57 PM, Benjamin Root <ben...@ou...> wrote:
> On Mon, Sep 27, 2010 at 1:47 PM, Eric Firing <ef...@ha...> wrote:
>
>> On 09/27/2010 08:35 AM, Benjamin Root wrote:
>> > On Mon, Sep 27, 2010 at 1:27 PM, Eric Firing <ef...@ha...
>> > <mailto:ef...@ha...>> wrote:
>> >
>> > On 09/27/2010 03:46 AM, Dieter Weber wrote:
>> > > Hi,
>> > > I'm using matplotlib embedded in my wxpython application and
>> > needed to
>> > > give users a quick way to relimit a figure, for example after
>> > removing a
>> > > line from a plot. Therefore I added a button to the toolbar. Do
>> you
>> > > think it would make sense to include this in matplotlib by
>> default?
>> >
>> > I don't think it would. The standard toolbar is for typical
>> interactive
>> > use, where I don't think the relimit functionality is needed often
>> > enough to justify having its own button--if at all. Better to keep
>> that
>> > toolbar simple.
>> >
>> > Eric
>> >
>> >
>> > Just playing devil's advocate here...
>> >
>> > Considering how we can now have multiple show() calls and with the
>> > upcoming ipython looking more and more spiffy, could there be a future
>> > use case for this toolbar button?
>> >
>> > On the other hand, how would the inclusion of this button impact users
>> > of other interactive scripts that have added their own buttons? I mean,
>> > planning for the future, can it be definitively said that matplotlib
>> > will never add anymore toolbar buttons? Could developers rely on that
>> > real estate not being taken over by rule of "eminent domain", if you
>> will?
>> >
>> > Ben Root
>> >
>>
>> Ben,
>>
>> I don't understand either of your questions. What's the point?
>>
>> Eric
>>
>>
> First, I am asking if there are no use-cases for this button in the future
> with the advent of an improved ipython environment? In other words, more
> people may use matplotlib+ipython like a regular MATLAB environment. Could
> this button be a useful feature later?
>
> Second, irregardless of whether this button is included or not, there have
> been app developers who have added buttons to the toolbar for their own
> use. Can these developers count on that real estate to always be free? Can
> we definitively say that matplotlib will never have more buttons added to
> its default toolbar?
>
> Does that make more sense?
>
>
A feature-set that MATLAB has and is missing from matplotlib is editing the
plot via the GUI. You can actually remove lines from the plot without typing
anything in the interpreter. I think it is via a line properties menu, but
maybe you can also get there by right-clicking the line and choosing delete
(can't recall, I'll have to check).
If/when we add support for such things in mpl, the relimit button would
become much more useful.
Until we have that, I think JDH's idea for cross-GUI configurable toolbars
is a better target to aim for.
 AA
From: butterw <bu...@gm...> - 2010年09月27日 22:42:17
a few comments:
One possible limitation of the proposed relim code is that it doesn't take
into account whether the lines are set visible or not. But otherwise it is
a useful function for interactive use, which incidentally is the way I use
matplotlib the most. 
Is there any reason why matplotlib doesn't have an optional additional
menubar ? You could fit far more commands than in a toolbar. 
btw as demonstrated by the qt4_editor it is not difficult to implement a
line properties dialog in matplotlib.
A feature-set that MATLAB has and is missing from matplotlib is editing the
plot via the GUI. You can actually remove lines from the plot without typing
anything in the interpreter. I think it is via a line properties menu, but
maybe you can also get there by right-clicking the line and choosing delete
(can't recall, I'll have to check).
If/when we add support for such things in mpl, the relimit button would
become much more useful.
Until we have that, I think JDH's idea for cross-GUI configurable toolbars
is a better target to aim for.
 AA
-- 
View this message in context: http://old.nabble.com/Toolbar-button-for-relimiting-tp29819182p29823872.html
Sent from the matplotlib - devel mailing list archive at Nabble.com.
From: Dieter W. <di...@ue...> - 2010年09月28日 07:54:44
Am Montag, den 27.09.2010, 15:42 -0700 schrieb butterw:
> a few comments:
> 
> One possible limitation of the proposed relim code is that it doesn't take
> into account whether the lines are set visible or not. But otherwise it is
> a useful function for interactive use, which incidentally is the way I use
> matplotlib the most. 
> 
> Is there any reason why matplotlib doesn't have an optional additional
> menubar ? You could fit far more commands than in a toolbar. 
> 
> btw as demonstrated by the qt4_editor it is not difficult to implement a
> line properties dialog in matplotlib.
> 
> 
> A feature-set that MATLAB has and is missing from matplotlib is editing the
> plot via the GUI. You can actually remove lines from the plot without typing
> anything in the interpreter. I think it is via a line properties menu, but
> maybe you can also get there by right-clicking the line and choosing delete
> (can't recall, I'll have to check).
> If/when we add support for such things in mpl, the relimit button would
> become much more useful.
> 
> Until we have that, I think JDH's idea for cross-GUI configurable toolbars
> is a better target to aim for.
> 
> AA
Here are my reasons to add the button, just to add to the discussion:
I've written two applications so far that embed matplotlib, and in both
I felt that the relimit button was missing: In one, there are always
lines added and removed and I often need to reset the plot limits, and
in the second one I do in fact change the line's data so that I want to
relimit occasionally. For that last application it is also important
that the zoom level remains the same, unless I really want to change it,
therefore the button and no automatic relimiting when lines are removed
or data are changed. In both applications the toolbar is most useful for
navigation in the plots, so please don't forget the people who embed
matplotlib when you design the toolbar... :-)
A menu would be great, it could for example be used in cases where the
toolbar would be out of place. For embedding, it would not be so
important to have a cross-platform interface for customization: After
all, you're stuck with one toolkit anyway... As far as I can tell about
wxpython, it is no problem to add anything to the toolbar afterwards.
Maybe one could implement a "feature bitmap" in the constructor to turn
specific buttons on or off.
I'm just wondering if there are use cases for customization during
interactive use, where it should definitely be cross-platform.
Greetings,
Dieter
From: John H. <jd...@gm...> - 2010年09月28日 16:09:19
> Here are my reasons to add the button, just to add to the discussion:
> I've written two applications so far that embed matplotlib, and in both
> I felt that the relimit button was missing: In one, there are always
> lines added and removed and I often need to reset the plot limits, and
> in the second one I do in fact change the line's data so that I want to
> relimit occasionally. For that last application it is also important
> that the zoom level remains the same, unless I really want to change it,
> therefore the button and no automatic relimiting when lines are removed
> or data are changed. In both applications the toolbar is most useful for
> navigation in the plots, so please don't forget the people who embed
> matplotlib when you design the toolbar... :-)
If you are embedding mpl, it is easy to design a custom toolbar. Eg, see
http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_wx4.html
JDH
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /