2

I notice that there is an option of figure fraction etc for annotating text. Is there an option for scatter? I have data points generated by a program that are in figure fraction scale. They will be overplotted onto an image with sky coordinate. The transformation from pixel scale to sky coordinate will be a bit complicated.

1 Answer 1

4

Checkout the transform tutorial. You want to first transform from figure units to display units using fig.transFigure, then do the inverse transform to data units, using ax.transData.inverted(). You can make a single transform using transform pipeline:

FigToData = ax.transData.inverted() + fig.transFigure

This can then be used to get values in data units by implementing the transform() method:

xData, yData = FigToData.transform(.1, .1)

Read the tutorial for more detail.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.