Mathematica: Matlab like figure plot?

After playing around for a while with various graphics and frame options I decided to take the simplest option - your polygon one: FramedPlotSinx Expx, {x, 1, 10}, Frame -> True, PlotRangePadding -> None, Axes -> False, Prolog -> {White, RectangleScaled{0, 0}, Scaled{1, 1}}, Background -> LightGray.

After playing around for a while with various graphics and frame options... I decided to take the simplest option - your polygon one: FramedPlotSinx Expx, {x, 1, 10}, Frame -> True, PlotRangePadding -> None, Axes -> False, Prolog -> {White, RectangleScaled{0, 0}, Scaled{1, 1}}, Background -> LightGray.

4 This works because Plot sets PlotRangeClipping -> True by default. (A good choice -- it keeps curves from drawing beyond the frame. ) Using Scaled instead of ImageScaled would be better, since the Scaled coordinate system naturally corresponds to plot range (ie, the region inside the frame.) – Brett Champion Jun 10 at 14:13 @Brett: Thanks Brett.

Using Scaled is by far the better choice. Too many graphics/image options and I always forget which is which. – Simon Jun 10 at 23:56 @Brett and @Simon: I edited my post in order to add a solution based on your ideas.

This gives me more control over my custom labels and graphics. Thank you for your answers. – jmlopez Jun 11 at 20:57 Congratulations on 4K rep and "Enlightened" Simon!

– Mr.Wizard Jun 11 at 22:32 Thanks @Mr.Wizard! I don't feel very enlightened... – Simon Jun 11 at 22:52.

You could also do: FramedPlot{Sinx Expx, Expx}, {x, 1, 10}, Frame -> True, Axes -> False, PlotRangePadding -> None, Filling -> {1 -> Top, 1 -> Bottom}, FillingStyle -> White, Background -> LightGray Edit I suspected problems when the function is not defined in the full range, but found it is not the case: FramedPlot{Piecewise{{x^2, x 6}}}, {x, 1, 10}, Frame -> True, Axes -> False, PlotRangePadding -> None, Filling -> {1 -> Top, 1 -> Bottom}, FillingStyle -> White, Background -> LightGray.

1 +1 nice way to hack it – Mr.Wizard Jun 10 at 12:31 +1 The hack even works if you want to fill down in color and have the rest white. FramedPlot{Piecewise{{x^2, x 6}}}, {x, 1, 10}, Frame -> True, Axes -> False, PlotRangePadding -> None, Filling -> {1 -> Top, 1 -> Bottom}, FillingStyle -> {White, Blue}, ImageSize -> Large, Background -> LightGray – Simon Jun 10 at 13:35 @Simon Not so well. Try -x^2 instead of x^2 – belisarius Jun 10 at 13:43 The problem there is a combination of the PlotRange and the default default (0) for Piecewise... – Simon Jun 10 at 13:57.

This is how I would do it: passepartoutplot_, opt : OptionsPattern := With{ p = Showplot, PlotRangePadding -> None }, ShowShow Graphics{((Background /. Optionsplot) /. Background -> Transparent), ApplyRectangle, TransposePlotRange /.

AbsoluteOptionsp}, p, Optionsp, opt This function should be able to take any Graphics object as its argument "plot". It uses whatever Background plot has been given beforehand, and then adds the frame according to the options Background and ImagePadding supplied to the passepartout function. For example, start with a plot p = PlotSinx, {x, 1, 10}, Frame -> True, Axes -> False, Background -> Yellow (I added a yellow background, but that's just for illustration and is completely optional).

To get what you're looking for, just say passepartoutp, ImagePadding -> 30, Background -> LightGray To make the frame thicker or asymmetric, use the standard ImagePadding syntax. You can also add other options such as AspectRatio to passpartout. In the passepartout function, I use AbsoluteOptions to extract the PlotRange that determines the "passepartout opening."

You could replace this by Options to speed things up, but the advantage of using AbsoluteOptions is that it also works for arbitrary Graphics, such as p = GraphicsCircle, Background -> Yellow.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions