Hot answers tagged

4

I agree on two counts: X3D is a logical export format, but Mathematica's X3D support is, at best, limited. Fortunately, the correspondence between Mathematica's GraphicsComplex and X3D is close enough that it is quite easy to roll your own exporter. To do so, let's begin with your own plot. We'll then extract out the primitives and directives that are ...


4

Something like this, confidenceinterval = .2; Plot[{Sin[2 x], Sin[2 x] + .5 confidenceinterval, Sin[2 x] - .5 confidenceinterval}, {x, 0, Pi/3}, Filling -> {3 -> {2}}, FillingStyle -> Directive[Opacity[.3], Pink], PlotStyle -> {Automatic, None, None}]


3

Your figure with the "band" shows a 95% prediction band and not a 95% confidence band. In Mathematica lingo you need to decide on whether you want a SinglePredictionBand or a MeanPredictionBand, respectively. (And the one you show is not appropriate given the change in variance from low predictor values to high predictor values.) Here is an example for ...


3

MeshShading Plot[Sin[x], {x, 0, 2 Pi}, MeshFunctions -> {# &}, Mesh -> {{Pi/2}}, MeshShading -> {Red, Directive[Dashed, Blue]}, PlotStyle -> Thick] Two piecewise functions Plot[{ConditionalExpression[Sin[x], x <= Pi], ConditionalExpression[Sin[x], x >= Pi]}, {x, 0, 2 Pi}, PlotStyle -> {Directive[Thick, Red], ...


2

Set ImagePadding option to None. (With None the exported image is cut a bit on the y-axis so use 10 instead of None) Plot[(180 Sqrt[\[Pi]^2 - 625 t] (\[Pi]^2 (-25 + 36 t) - 1500 t (-15 + 45 t -Sqrt[-\[Pi]^2 + 900 t])))/(\[Pi]^4 Sqrt[-\[Pi]^2 + 2500 t]) + Tan[2 Sqrt[\[Pi]^2 - 625 t]], {t, 0.01, 0.016}, AxesStyle -> {{Directive[Red, 12], ...


2

One more trick is to use Show Show[Plot[Sin[x], {x, 0, Pi}, PlotStyle -> Red], Plot[Sin[x], {x, Pi, 2 Pi}], PlotRange -> {{0, 2 Pi}, Automatic}]


2

ClearAll[mat, minev] SeedRandom[1] rm = RandomInteger[10, {400, 400, 3}]; mat[t_] := rm.{1, t, t^2}; minev[t_?NumericQ] := Eigenvalues[mat[t], -1]; DiscretePlot[Evaluate[minev[t]], {t, 0, 1, .01}]



Only top voted, non community-wiki answers of a minimum length are eligible