Skip to content

Instantly share code, notes, and snippets.

@davipatti
Last active September 20, 2023 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davipatti/cccb3112c0ab9b934374e025939eae9b to your computer and use it in GitHub Desktop.
Save davipatti/cccb3112c0ab9b934374e025939eae9b to your computer and use it in GitHub Desktop.
[Useful matplotlib transforms] #matplotlib
import matplotlib.pyplot as plt
ax = plt.gca()
axis_to_data = ax.transAxes + ax.transData.inverted()
data_to_axis = axis_to_data.inverted()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment