New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multi-colored text example #2561
Conversation
Why both png and jpg versions of the unicorn? |
oops. the jpeg is the original, but IIRC we can't open jpegs natively, which is why I included the png. let me work some git magic to remove the jpeg from the commits... |
ok, removed the jpeg, so just the png now |
from matplotlib import transforms | ||
from matplotlib.cbook import get_sample_data | ||
|
||
def rainbow_text(x,y,ls,lc,**kw): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could do with some spaces 😉
@ivanov - I love it. As you can see, you've got a bunch of really picky comments from me, but what else would you expect? 😉 Thanks for sharing! |
I'm sorry, but as resident curmudgeon I have to report that although the example is clever and cute, I don't think it is appropriate for mpl. |
@efiring is this because of the content? Because this is just an example, and we're not adding anything to mpl internals precisely because I don't think such functionality belongs in mpl. |
@ivanov It is just the specific image file you chose to annotate that grates on me; having an example of how to manipulate text in this way is all to the good, entirely appropriate, and much appreciated. |
I guess there aren't enough dolphins in swimming about in this example? 😉 Eric, thanks for chiming in with dissent. I appreciate and generally share in the curmudgeonry, and don't mind removing the image if need be. I just also like the history behind the dolphin example, so wanted to add a bit more to that legacy. Unless others chime in with a strong preference for keeping it in, I'll go ahead and remove it. |
@ivanov: We just discussed this on the hangout. Many of us like this and think it's funny, but we think we should err on avoiding potentially offensive images... so as cool as this is, we should probably remove it ;) Other than that, I have no objections on a technical level. |
I hope @pelson and @tacaswell realize that this is just an example gallery file when they were doing their code review
Ok, I've removed the image from git history here, glad you guys found it funny, I'll have to use that image elsewhere. I have also made the changes that @pelson and @tacaswell requested. Here's the current, hopefully less offensive rendered version. Let me know if I need to change the text, too, but otherwise this is ready to be merged. |
I think the |
I disagree. Why should we be encouraging users to use that? It's very annoying to have to pass an axes argument, especially in cases (pretty much always?) where there is an implicit one that can be used, instead. There is exactly one example where we have a function that takes an |
Leaving an optional |
The problem with implicit axes is, very much like my comments, they involve too much hidden state ;) If you only have one axes in one figure, that As part of a larger discussion (that I think is going on with the re-ordering of the user guide?) I think we should push the OO interface more in the examples and documentation and de-emphasize the The |
@tacaswell ok, I understand your reasons, and I think we'll just have to agree to disagree :) I'm more interested in the interactive usage of plotting functions, and not in monkey patching Axes to use them, and making
looks more like either:
Making |
ok, i'll go ahead and merge this tomorrow unless i hear otherwise |
ok, fingers crossed, merging. |
as suggested over in #697, that example is being added to the gallery