Tag Info

Hot answers tagged

10

You can use PolarPlot to plot the curves. As noted in the question you need to map the polar angle onto the -1 to 1 domain of the polynomials. You should also note that only the even polynomials are plotted. PolarPlot[Evaluate @ Table[n + ChebyshevT[n, t/Pi - 1], {n, 0, 40, 2}], {t, 0, 2 Pi}] To get the filling effect you can used FilledCurve: Graphics ...


9

Regarding the plot issue, I tried using HoldForm[x = Stack[_]] as an axis label to capture the stack at the moment of evaluation inside HoldForm. This revealed a problem in a helper function for dealing with units. The function Visualization`Utilities`OptionsDump`unitFormStringQ is applied to the axis labels (in a pattern test). The definition is this: ...


9

I'm not sure what's going on with HoldForm[InputForm[ℰ]], but I think I know what's going on with Plot. It appears at some point ReleaseHold is called because wrapping HoldForm twice fixes your problem. Plot[x^2, {x, -2, 2}, AxesLabel -> {x, HoldForm[HoldForm[InputForm[E = 1]]]}]


8

Try this: Plot[Sin[2 x], {x, -Pi, Pi}, AxesLabel -> {"This is\n an axes label", None}] And here's the same using FrameLabel instead of AxesLabel. Plot[Cos[2 x], {x, -Pi, Pi}, Frame -> True, FrameLabel -> {{"This is\n a y frame label",None}, {"This is\n an x frame label", None}}] This is covered in the documentation under Newlines ...


7

I can't comment on exactly why HoldForm has changed but I believe your examples fall under the purview of the new Active/Inactive functionality. For example: Clear[x]; Plot[Sin[x], {x, 0, 1}, AxesLabel -> {Inactivate[x = 3], Inactive[Set][InputForm[E], 3]}] x Note, however that Inactivate can't be used with InputForm, since you want InputForm to ...


6

I would use MeshShading, as shown in the documentation for ParametricPlot3D: ParametricPlot3D[{x, y, x^2 + y^2 - 5}, {y, -3, 3}, {x, -3, 3}, MeshShading -> {Directive[Opacity[.8], Blue], Directive[Opacity[.8], Yellow]}, Mesh -> {{0}}, MeshFunctions -> {#3 &}, BoundaryStyle -> {Black, Thickness[.01]}, Lighting -> "Neutral"]


6

The theme generates a framed plot. You need to use FrameLabel,e.g. Plot[x^2, {x, 0, 3}, FrameLabel -> {Style[x, 30], Style[y, 30]}, PlotTheme -> "Scientific"]


6

I can add to Mr.Wizards' answer that when InputForm is wrapped by any head like List (// InputForm // List) the output is much more readable because in this case it is represented in StandardForm instead of pure textual representation. StandardForm allows semantical selection by double-clicking. From the other hand it is worth to know that the width of the ...


6

As far as I know the specific output format of Plot (and similar commands) is not documented. I believe it has changed between versions therefore any post-processing (such as your replacement rule) must be considered potentially version dependent. As Michael comments above the documentation does state: Plot normally returns Graphics[{Line[...],...}]. ...


6

Assuming that your 3D plot is in Graphics3D format, you should be able to just extract the points on the graph and use ListContourPlot. f[x_, y_] := -E^(-(1 + x)^2 - y^2)/3 + 3*E^(-x^2 - (1 + y)^2)*(1 - x)^2 - 10*E^(-x^2 - y^2)*(x/5 - x^3 - y^5); cp = ContourPlot[f[x, y], {x, -3, 3}, {y, -3, 3}, PlotRange -> All, PlotLabel -> "Computed from ...


5

While this is overkill, I'm just trying everything I can do with these new (in V10) and exciting Mesh and Region functions. So here we go: f[x_, y_] := -E^(-(1 + x)^2 - y^2)/3 + 3*E^(-x^2 - (1 + y)^2)*(1 - x)^2 - 10*E^(-x^2 - y^2)*(x/5 - x^3 - y^5); gr = Plot3D[f[x, y], {x, -3, 3}, {y, -3, 3}, PlotRange -> All, PlotPoints -> 100]; We ...


5

In my opinion it's not a bad thing to use Plot3D for this as you offload plane intersection to the GPU. You can get an orthogonal view like this: Plot3D[ {1 + 3/2 v, 1 + 2/3 m + 1/6 v, 9/4 + 1/8 v, 10/7 m, m + Min[2/3, 1/2 m, v]}, {m, 1,2}, {v, 0, 1}, PlotStyle -> {Orange, Red, Blue, Green, Black}, ViewPoint -> {0, 0, -∞} ]


5

Here's a V10 solution with ImplicitRegion. fns = {1 + 3/2 v, 1 + 2/3 m + 1/6 v, 9/4 + 1/8 v, 10/7 m, m + Min[2/3, 1/2 m, v]}; rgns = Table[ ImplicitRegion[ Reduce[{And @@ Thread[fns[[i]] < Drop[fns, {i}]], 1 < m < 2, 0 < v < 1}, {m, v}], {m, v}], {i, Length[fns]}]; Show[MapThread[ RegionPlot, {rgns, Thread[PlotStyle -> ...


4

flist = {1 + 3/2 v, 1 + 2/3 m + 1/6 v, 9/4 + 1/8 v, 10/7 m, m + Min[2/3, 1/2 m, v]}; pieceW = Piecewise[Table[{i, flist[[i]] == Min[flist]}, {i, 1, Length@flist}]]; DensityPlot DensityPlot[pieceW, {m, 1, 2}, {v, 0, 1}, PlotPoints -> 200, ImageSize -> 500, ColorFunction -> ({Orange, Red, Blue, Black, Green}[[#]] &), ...


4

"Scientific" is a framed plot style therefore you need FrameLabel: Plot[x^2, {x, 0, 10}, FrameLabel -> {x}, PlotTheme -> "Scientific"]


3

Try this: ParametricPlot3D[{{x, x/2, z}, {x, 5, z}}, {x, 5, 20}, {z, -0, 5}, PlotStyle -> {{Yellow, Opacity[0.5]}, {Blue, Opacity[0.5]}}, Mesh -> None, BoxRatios -> {1, 1, 1}, AxesLabel -> {Style["x", 16], Style["y", 16], Style["z", 16]}] yielding and have a look into the documentations for the explanation.


3

Update: BubbleChart with a custom ChartElementFunction: bcdata = MapIndexed[Join[#2, {#1, 1}] &, whiteballs, {-1}]; (* transform data to a form acceptable for BarChart3D *) ceF[ind_:3, sz_:36, c_:Black][{{xmin_, xmax_}, {ymin_, ymax_},{zmin_, zmax_}}, v_, m_] := Dynamic@Module[{vtc = {{0, 0}, {0, 1}, {1, 1}, {1, 0}}}, ...


2

The maximum number of labeled bars seems to be limited to 99 when LabelingFunction is used. An alternative work-around is to wrap data with Labeled: RandomSeed[1] barchart2[n_,m_]:= Module[{dt=RandomInteger[10,{n,m}]}, BarChart[Labeled[#,#,Center]&/@#&/@dt, AspectRatio->0.2,ImageSize->700, ...


2

It's in the documentation for FrameTicks here: http://reference.wolfram.com/language/ref/FrameTicks.html Plot[Sin[x], {x, 0, 10}, Frame -> True, FrameTicks -> {{{-1, 0, 1}, None}, {{0, Pi, 2 Pi, 3 Pi}, None}}] Which plots If you want custom labels, as per Is it possible to substitute tick labels with alternative text? Plot[Sin[x], {x, 0, 10}, ...


2

A workaround is just to use multiple bar charts for the data RandomSeed[1]; Clear[barchart]; barchart[n_, partitions_: 1] := Module[ {m = Ceiling[n/partitions]}, BarChart[ #, LabelingFunction -> (Placed[#1, Center] &), AspectRatio -> 0.2, ImageSize -> 700, ChartLayout -> "Percentile"] & /@ Partition[ ...


2

You mention two parameters, m and bsp, but not the third ξ. I will concentrate on solving f'[η] == 0.99 for ξ == 0.2. Use ParametricNDSolveValue to set up the differential equations, and use WhenEvent to solve any ancillary equations that you wish, for example f'[η] == 0.99. If you use Sow as I did, you need to turn the caching off, or the root will be ...


2

Change PlotRange to {-1, 1} and set AspectRatio to 1. Plot[{Sqrt[1 - x^2], -Sqrt[1 - x^2]}, {x, -2, 2}, PlotRange -> {-1, 1}, AspectRatio -> 1] Result: PS: That's one of the way, to get the desired output.


2

You can specify PlotRange -> All to avoid clipping in the "z"-axis (if you don't know the z-range beforehand): ContourPlot[ PDF[BinormalDistribution[0.8], {v1, v2}], {v1, -4, 4}, {v2, -4, 4}, PlotLegends -> Automatic, PlotRange -> All]


2

A solution with the new function InfinitePlane in v10: Graphics3D[ InfinitePlane@ Values@FindInstance[#, {x, y, z}, Reals, 3] & /@ {y + 5 == 0, x + 2 y == 0}] yielding and have a look into the documentations for the explanation.


2

Plot[Table[ConditionalExpression[C*r^2 + 2 C, r >= C], {C, {25, 100, 150, 300}}] // Evaluate, {r, 0, 500}, PlotLegends -> LineLegend[{25, 100, 150, 300}, LegendLabel -> C, LabelStyle -> {GrayLevel[0.2], Bold, 10}, LegendFunction -> "Frame"], AxesLabel ...


2

An alternative to manually setting line breaks is to set a label size and then let the label break as needed: Plot[Cos[2 x], {x, -Pi, Pi}, Frame -> True, FrameLabel -> {{Pane["This is a y frame label", {50, All}], None}, {Pane["This is an x frame label", {50, All}], None}}]


1

Just add AspectRatio -> Automatic (the default value is 1/GoldenRatio): Plot[{Sqrt[1 - x^2], -Sqrt[1 - x^2]}, {x, -2, 2}, PlotRange -> {-2, 2}, AspectRatio -> Automatic]


1

If I understand your question then you want: Plot3D[Sin[x + y^2], {x, -3, 3}, {y, -2, 2}, MeshFunctions -> {#1 &, #3 &}] If that is the case this is directly documented and the question should probably be closed. If not please try again.


1

I used 3 rather than 6 functions for each plot and used a Frame rather than Axes to reduce the clutter. f := RandomReal[]; h := Floor[f*20]; When the Table is inside of the Plot use Evaluate Manipulate[ Plot[ Evaluate[ Table[f Sin[h x + h t], {3}]], {x, -5, 5}, PlotRange -> {-1.1, 1.1}, Frame -> True, Axes -> False], {{t, 5}, 0, ...


1

Considering work-arounds, Style and Inactivate seem to work well together. Plot[x , {x, 0, 1}, AxesLabel -> {Style["M", Italic], Style[Inactivate[InputForm[E] = M c^2, (Set | Times)], "TraditionalForm"]}] Inactivating Times keeps M c^2 from being rewritten to c^2 M.



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