Docs for a method wrapping a matplotlib method

  1. Don’t use ax._sci , keep track of your images your self so you can be consistent with scatter and other collection types

fear not! I keep track of the returned objects directly, but I don’t want to disrupt colorbars. So when users (i.e. me) run this code everything should “just work”:

from mpl_interactions import interactive_imshow
def f(param):
....
interactive_imshow(f, param = (0,5))
plt.colorbar()

and have the colorbar show up in the correct place and be based on the correct image.

now out of date as those scheduled dates are past, but)). I see you are a graduate student so I assume you have TA’d, at what point do you identify your students are not turning in thier own work :wink: ? When in doubt, I err on the side of including a copy license and leaving a comment in the source saying “this function copied from Matplotlib

hahaha that’s a good test for copying. I will do as much.

To my earlier point about docs I think it would be awesome if the docs had something like a writing a third party package page. With some basic practical advice such as:

  • practical copyright rules
  • Explain the standard for inclusion in the third-party-packages list
    • Is there a standard? I felt very weird about how I seemed to be self-advertising when I added mine
  • point out that pytest-mpl exists
    • I somehow missed this for weeks
  • admonish the use of private methods
  • mention that they can (should?) redirect questions to discourse
  • information in this post about passing through docstrings
1 Like