On 6 September 2012 14:20, Benjamin Root <ben.r...@ou.edu> wrote:
>
>
> On Thu, Sep 6, 2012 at 5:29 AM, Jon Roadley-Battin
> <jon.roadleybat...@gmail.com> wrote:
>>
>> Good morning,
>>
>> I have an odd problem with saving plot images via the navigation bar
>> (unsure if it is unique to the navigation bar) if I have added custom
>> text.
>>
>> BACKGROUND.
>> I have a python gui which is used to connect to some hardware as a
>> diagnosis tool. Its a pyGTK program and on one ui tab there is an
>> embeded matplotlib plot.
>> Now some of the signals I plot rather than being a waveform is more of
>> a collection of flags (16bit but thats a by and by)
>> eg:
>>
>>
>>
>>
>> fault
>> 0  = fault1
>> 0 = fault2
>> 1 = fault3
>> 0 = fault4
>>
>>
>>
>> so for this  I can plot this and it will show 2 (possibly changing w.r.t.
>> time).
>> I then hook in via a onpick event such that if I click on a plot I
>> essentially do this:
>>
>>                     self.figtxt =
>> self.fig.text(0.79,0.92,'\n'.join(txt),va='top',
>> bbox=dict(boxstyle='round', facecolor='white',alpha=0.7))
>>                     self.plot_marker =
>> self.plot_area.plot(xdata,ydata,'x',color=event.artist.get_color(),ms=7)
>>
>> ie I put a cross where someone clicked (for indication) and I also
>> create a texxbox which lists human readable version of what bits are
>> set.
>> Great, really helpful in debugging.
>>
>> The issue is if you click on the save image icon on the navigation
>> toolbar it saves the waveform and legend BUT not the additional
>> content (the cross and the textbox).
>>
>>
>> any idea as to how todo this?
>>
>
> What you are describing should work as expected.  Is it possible that you
> could make a simple, self-contained version (hopefully it doesn't need to be
> embedded to reproduce the problem)?  Maybe a modification of one of the
> existing examples in the online docs might be able to reproduce your issue?
>
> Ben Root
>

Good afternoon,
I agree it should work and the examples i have run allow this so this
is why I am looking over my specifics.
The only thing I can see is the examples call to add txt via an axes
entity, I have been doing it via a figure entity.

I am going to re-write to draw on the axis (last time I did this it
didn't display hence going for a figure).

If this doesn't work I shall strip the code down to a minimum example
demonstrating what I am describing

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to