Virgil,

Glad to hear you got it to work.  You are right that you have to set rcParams 
before the corresponding element is created (in this case the figure) for the 
rcParams to affect that creation.  

-Sterling

On Nov 12, 2014, at 4:00PM, Virgil Stokes wrote:

> On 12-Nov-14 22:20, Sterling Smith wrote:
>> Virgil,
>> 
>> Presumably you set up some callback function that is called when you click 
>> on the first figure, and which creates the second figure.  Can't you change 
>> rcParams['toolbar'] in that callback function?  Does it not have any effect?
>> 
>> -Sterling
>> 
>> On Nov 12, 2014, at 12:50PM, Virgil Stokes wrote:
>> 
>>> I would like to be able to control when there is and there is not a 
>>> navigation toolbar for figures. For example, suppose I have created a 
>>> figure in which I do not wish to have a toolbar. I have used the following 
>>> statement for this:
>>> 
>>> mpl.rcParams['toolbar'] = 'None'
>>> 
>>> which works fine. This figure (without a navigation toolbar) contains some 
>>> points in it that are used to display more figures (each with an image in 
>>> it). That is, when one of the points is clicked on with a mouse, a new 
>>> figure is created with a PNG image in it. I wish to have a navigation 
>>> toolbar in all these figures containing images.
>>> 
>>> How can I place navigation toolbars in these figures with PNG images?
>>> ------------------------------------------------------------------------------
>>> Comprehensive Server Monitoring with Site24x7.
>>> Monitor 10 servers for $9/Month.
>>> Get alerted through email, SMS, voice calls or mobile push notifications.
>>> Take corrective actions from your mobile device.
>>> http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk_______________________________________________
>>> Matplotlib-users mailing list
>>> Matplotlib-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> OK Sterling!
> I now have it --- I needed to do the following when displaying the figures 
> containing the images:
> 
> mpl.rcParams['toolbar'] = 'toolbar2' # to restore toolbar
>  f, ax = plt.subplots(figsize=(5,4)) # for images
> 
> It was important to have this order in the statements; i.e., the mpl before 
> the figure was defined.
> Thanks for the help


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to