DOC: improve annotation demo#6455
Conversation
| ax.annotate('pixel offset from axes fraction', xy=(1, 0), | ||
| xycoords='axes fraction', | ||
| xytext=(-20, 20), | ||
| textcoords='offset pixels', |
There was a problem hiding this comment.
None of the documentation, including the block at the top of the example, lists "offset pixels" as a valid option.
There was a problem hiding this comment.
fixed here and removed the comments about negative directions.
On my to-do list for today is a more general going over of the annotation docs as I think we cleaned up the arrow handling we may have broken API a bit (using xytext without arrowprops does not draw an arrow any more).
There was a problem hiding this comment.
Ah, did we remove all negative direction handling?
| xycoords='axes points', | ||
| horizontalalignment='right', verticalalignment='bottom', | ||
| fontsize=20) | ||
| ax.annotate('pixel offset from axes fraction', xy=(1, 0), |
There was a problem hiding this comment.
Because we removed the special casing of negative numbers on the axes * coordinate systems (see #4843)
There was a problem hiding this comment.
(continued) that example will put text that is right algined starting at 20px to the left of left edge of the axes. The example in the PR puts the text 20px to the left of the right edge of the axes.
|
Instead of line comments (which I broke the email links to by force-pushing an updated commit), consolidate the negative related comments here. In discussion in #4292 (implemented in #4843) we decided to remove all of the negative wrapping from annotations. That change was the source of the very broken looking example. On a bit more consideration, this example should probably be an image test. |
closes #5994
is what it looks like now.
We will probably have to revisit this on 2.x due to the default figure size/dpi changes.