Let me remark that I'm relatively new to using SciDraw, but I have read through the tutorial. Currently I'm using SciDraw v0.7 in Mathematica 10.2. I find that there is very strange behavior when defining a Plot in the FigGraphics wrapper over a range different from what XPlotRange is specified to be. For example, I want to plot

$ f(x) = -\frac{(1-x) \left(2 x^3+4 x^2+6 x+3\right)}{2 \left(x^4+x^3+x^2+x+1\right)} $ over $x \in [1,10]$

I define the SciDraw canvas as,

   FigGraphics[Plot[f[x], {x, 1, 10}]];
  XPlotRange -> {1, 10},
  YPlotRange -> {0, 1}
 CanvasSize -> {5, 3.5}

enter image description here

The canvas ranges are correct but the plot appears to be cut off at $x=2$. What is even more strange is if I change the range over x in the Plot command to $\{x,0,5\}$ I get,

enter image description here

Indeed, $f(x) = 0$ at $x=1$ and if I just run the regular mathematica command,

Plot[f[x], {x, 1, 10}, PlotRange -> All]

I get a full correct plot. Anyone else experience this or know of a fix? Is the input correct?


closed as off-topic by Szabolcs, rhermans, MarcoB, J. M. is away May 29 '17 at 11:51

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Szabolcs, rhermans, MarcoB, J. M. is away
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Well, just include the PlotRange -> All in Plot even when using it in FigGraphics. Within Plot, that option controls what gets plotted, not what gets shown. $\endgroup$ – Szabolcs May 26 '17 at 7:23

PlotRange does something different in Plot vs Show/SciDraw.

In Plot, it controls which part of the curve should be generated.

In Show, it controls the range of the plot frame. Only objects within the plot frame are visible.

You are (perhaps implicitly) assuming that Plot generates the full curve, even those parts which fall outside of the plot range. Thus increasing the plot range after the plot has been created should reveal more of the curve. This is not the case. The sections of the curve outside of the plot range will not even be generated by Plot.


Mathematica graphics

Solution: Use PlotRange -> All within Plot. This setting is completely independent of the YPlotRange setting of SciDraw. Use both simultaneously.


Not the answer you're looking for? Browse other questions tagged or ask your own question.