ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 14 Nov 2013 02:27:49 -0600Documentation for show involving ymin and ymaxhttp://ask.sagemath.org/question/10733/documentation-for-show-involving-ymin-and-ymax/I was reading the documentation on 2d plotting again and I noticed something that I find strange. In the [plot documentation](http://www.sagemath.org/doc/reference/plotting/sage/plot/plot.html#sage.plot.plot.plot), there is the following phrase:
>If you want to limit the plot along the horizontal axis in the final rendered figure, then pass the xmin and xmax keywords to the show() method. To limit the plot along the vertical axis, ymin and ymax keywords can be provided to either this plot command or to the show command.
Ok, so this feels pretty obvious and all is well and good. But then you get [other questions](http://ask.sagemath.org/question/1242/add-plots-with-different-ymin-ymax-parameters) that show that ymin and ymax don't behave naively, nor are they associated directly with plot. Instead, that [answer](http://ask.sagemath.org/question/1242/add-plots-with-different-ymin-ymax-parameters?answer=1957#1957) says that ymin and ymax are really just always passed to show, and so should be thought of as show arguments.
Hmm, so it's not so obvious. So we might go to the [show documentation](http://www.sagemath.org/doc/reference/plotting/sage/plot/graphics.html#sage.plot.graphics.Graphics.show) to better understand what is going on. Unfortunately, show does not mention anything about ymin or ymax, or what happens when they're added together.
As far as I can tell, there is nothing in any show documentation that mentions ymin or ymax. Is that correct? If so, is that by design?Wed, 13 Nov 2013 16:48:47 -0600http://ask.sagemath.org/question/10733/documentation-for-show-involving-ymin-and-ymax/Answer by kcrisman for <p>I was reading the documentation on 2d plotting again and I noticed something that I find strange. In the <a href="http://www.sagemath.org/doc/reference/plotting/sage/plot/plot.html#sage.plot.plot.plot">plot documentation</a>, there is the following phrase:</p>
<blockquote>
<p>If you want to limit the plot along the horizontal axis in the final rendered figure, then pass the xmin and xmax keywords to the show() method. To limit the plot along the vertical axis, ymin and ymax keywords can be provided to either this plot command or to the show command.</p>
</blockquote>
<p>Ok, so this feels pretty obvious and all is well and good. But then you get <a href="http://ask.sagemath.org/question/1242/add-plots-with-different-ymin-ymax-parameters">other questions</a> that show that ymin and ymax don't behave naively, nor are they associated directly with plot. Instead, that <a href="http://ask.sagemath.org/question/1242/add-plots-with-different-ymin-ymax-parameters?answer=1957#1957">answer</a> says that ymin and ymax are really just always passed to show, and so should be thought of as show arguments.</p>
<p>Hmm, so it's not so obvious. So we might go to the <a href="http://www.sagemath.org/doc/reference/plotting/sage/plot/graphics.html#sage.plot.graphics.Graphics.show">show documentation</a> to better understand what is going on. Unfortunately, show does not mention anything about ymin or ymax, or what happens when they're added together.</p>
<p>As far as I can tell, there is nothing in any show documentation that mentions ymin or ymax. Is that correct? If so, is that by design?</p>
http://ask.sagemath.org/question/10733/documentation-for-show-involving-ymin-and-ymax/?answer=15697#post-id-15697If you look at the [graphics object page](http://www.sagemath.org/doc/reference/plotting/sage/plot/graphics.html) as a whole, there are some references to `ymin` and `ymax` in the axis setting part. And, as you point out, [the documentation for `plot`](http://www.sagemath.org/doc/reference/plotting/sage/plot/plot.html#sage.plot.plot.plot) explicitly has it, and mentions it is passed to `show`... But I agree this is not ideal, and more by neglect than design.
Edit: [This is now Trac 15419](http://trac.sagemath.org/ticket/15419).Thu, 14 Nov 2013 02:27:49 -0600http://ask.sagemath.org/question/10733/documentation-for-show-involving-ymin-and-ymax/?answer=15697#post-id-15697