ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 29 Dec 2014 16:58:17 +0100Normalized coordinates for plots/graphics?https://ask.sagemath.org/question/25357/normalized-coordinates-for-plotsgraphics/ Is it possible to use normalized (unit) coordinates for graphics?
I would like to position a text label below the x-axis of a plot. Something like this:
po = plot(...)
po += text( (r'$mylabel$', (.5, -.1))
Where (.5, -.1) are coordinates relative to the bounding box of the plot with the extends (0..1,0..1). So yes, this is a very simple coordinate transformation. Do I have to do it by hand?
And if so, how do I get the actual bounding box of the plot?Mon, 29 Dec 2014 15:46:33 +0100https://ask.sagemath.org/question/25357/normalized-coordinates-for-plotsgraphics/Answer by FrédéricC for <p>Is it possible to use normalized (unit) coordinates for graphics? </p>
<p>I would like to position a text label below the x-axis of a plot. Something like this:</p>
<pre><code>po = plot(...)
po += text( (r'$mylabel$', (.5, -.1))
</code></pre>
<p>Where (.5, -.1) are coordinates relative to the bounding box of the plot with the extends (0..1,0..1). So yes, this is a very simple coordinate transformation. Do I have to do it by hand?
And if so, how do I get the actual bounding box of the plot?</p>
https://ask.sagemath.org/question/25357/normalized-coordinates-for-plotsgraphics/?answer=25358#post-id-25358Maybe
po.get_minmax_data()Mon, 29 Dec 2014 16:58:17 +0100https://ask.sagemath.org/question/25357/normalized-coordinates-for-plotsgraphics/?answer=25358#post-id-25358