Suppose that I make a plot of $x^2$ vs. $x$:
myPlot = Plot[x^2, {x, -1, 1}, Frame -> True]
If I click on the plot, I see the orange handles with which I can resize the plot:
Now, suppose that I want to actually crop the plot -- I would like to effectively shrink the orange box so that some of the plot is actually cropped. (Why in the world would I want to do this? It's a long story...)
I have found, from answers to a question that I previously asked, that this is possible using ImagePad
with negative arguments. For example, suppose that I want to crop 40 pixels off the right side of the plot. I can do the following:
ImagePad[myPlot, {{0, -45}, {0, 0}}]
It looks good so far. However, when I resize the resulting cropped plot by dragging the orange handles, it looks like the image has been rasterized:
But, in contrast, I need the image to remain a vector image (non-rasterized) after cropping. Is that possible? I am running both version 8 and 9.
PlotRange
is no option? Like:Plot[x^2, {x, -1, 1}, Frame -> True, PlotRange -> {{-1, 0.5}, Automatic}]
$\endgroup$PlotRange
is not an option for me. I need to be able to crop the entire image -- including white space, frames, frame ticks, and frame labels. $\endgroup$