Last active
September 20, 2023 20:54
-
-
Save davipatti/cccb3112c0ab9b934374e025939eae9b to your computer and use it in GitHub Desktop.
[Useful matplotlib transforms] #matplotlib
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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