this was the second warning, it’s made by an other file.py, but it is the same:
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/axes.py:4486: UserWarning: No labeled objects found. Use label=‘…’ kwarg on individual plots.
warnings.warn("No labeled objects found. "
···
Il giorno domenica 5 ottobre 2014 18:02:13 UTC+2, Andrea Mastrangelo ha scritto:
excuse me, i don’t have the message and now i cut this lines of code
it was something like: pot hasn’t attribute ‘legend’
and then, after some modifies the warning was about patch
it wasn’t an error because the file has been saved, but without legend
Il giorno domenica 5 ottobre 2014 17:25:25 UTC+2, fuzzydoc ha scritto:
On Sun, 5 Oct 2014, Andrea Mastrangelo wrote:
… but i get a warning message
Could you help me?
It would be easier for someone to help you if you provide the warning
A) You should not ask MPL questions in a wxPython forum
B) Do you use mpl 1.3.1 (very likely, because mpl 1.4.0 is still very fresh)?
In that case this will not work (there is also no mentioning of this syntax in the 1.3.1 docs).
You can use instead
plt.legend([blue_patch], [self.y_ok[0]])
``
···
On Sunday, October 5, 2014 4:46:54 PM UTC+2, Andrea Mastrangelo wrote:
Sorry for the mistake, I didn’t think about the wx, absentmindedly i though it was a python forum.
Thank you for the assistance, i kept the syntax in a forum where they didn’t say it works only with new library. I will check the difference and then i think i’ll download new versioni!
Thank you very much
···
Il giorno lunedì 6 ottobre 2014 10:10:03 UTC+2, nepix32 ha scritto:
On Sunday, October 5, 2014 4:46:54 PM UTC+2, Andrea Mastrangelo wrote:
I guys, i can’t add a legend to a plot i’m saving
A) You should not ask MPL questions in a wxPython forum
B) Do you use mpl 1.3.1 (very likely, because mpl 1.4.0 is still very fresh)?
In that case this will not work (there is also no mentioning of this syntax in the 1.3.1 docs).
You can use instead
plt.legend([blue_patch], [self.y_ok[0]])