Hot answers tagged plotting
13
Here's a start. I'll leave the labeling and fine tuning the details to you:
With[{thin = {Thin, Opacity[0.4]}},
RegionPlot[x^2 + y^2 <= 1, {x, -1, 1}, {y, -1, 1},
ColorFunction -> (Hue[ArcTan[#, #2]/(2 π)] &),
ColorFunctionScaling -> False, PlotPoints -> 100, Frame -> False,
Mesh -> {21, 21, 10, 7, 47}, ...
4
It is of course possible to draw everything manually.
Manipulate[
With[{
colArea =
Polygon[#2, VertexColors -> ConstantArray[Hue[#1/(2 Pi)], 3]] & @@@
Table[{phi, {{0, 0}, {Cos[phi], Sin[phi]}, {Cos[phi + Pi/40], Sin[phi + Pi/40]}}},
{phi, 0.0, 2 Pi, Pi/40}],
gridLines =
Table[{{x, -#}, {x, #}} &[Sqrt[1 - x^2]], {x, ...
4
I set out to do this differently from R.M but I ended up with something very similar. Nevertheless I think there is a certain simplicity that results from my using ParametricPlot so here it is:
ParametricPlot[
r {Cos[t], Sin[t]}, {t, 0, 2 Pi}, {r, 0, 1},
Axes -> False, Frame -> False,
Mesh -> {47, 11, {0}, 8, 27, 27},
MeshFunctions -> {#3 ...
4
Maybe you can do something like this:
nielsensFunction[x_?InexactNumberQ] :=
\[FormalY] /. First @ FindRoot[\[FormalY] - Tanh[2 (2 \[FormalY] + x)/5],
{\[FormalY], Tanh[x]}, WorkingPrecision -> Precision[x]]
I used a formal symbol as a temporary variable within FindRoot[] for safety, since they are guaranteed to ...
3
f[x_] := y /. FindRoot[y == Tanh[(2 y + x)/2.5], {y, x}]
Plot[2.5 Log[2 Cosh[(2 f[x] + x)/2.5]], {x, -1.5, 1.5}]
Analyze
g[x_, d_] := y /. FindRoot[y == Tanh[(2 y + x)/d], {y, x}]
Manipulate[
Plot[g[x, d], {x, -1.5, 1.5},
PlotRange -> {-1, 1}],
{{d, 2.5}, 1, 3}]
2
Just for fun, only the color wheel drawing part done with Disk sectors:
With[{sectors = 360},
angle = 2 Pi/sectors;
Graphics[
Table[{Hue[i/sectors], EdgeForm[{Thick, Hue[i/sectors]}],
Disk[{0, 0}, 1, {i angle, (i + 1) angle}]}, {i, 0, sectors - 1}]]]
I had to use a thick EdgeForm because without it I was getting a moire pattern in the rendering.
...
2
I'm going to make some assumptions/guesses based on the code:
The . represents the Dot product.
ψorbR, ψorbT are each a list/vector of complex numbers of length NN.
Since i runs from 1 to NN, Sign[i] may be omitted.
Since a[i] is evaluated only in Abs[a[i]] the -I factor may be omitted.
Since the terms containing a[i] are multiplied by 0 if ε^2 < 2i, ...
2
This sounds like what you want:
ContourPlot[Sqrt[x^2 + y^2], {x, -17, 17}, {y, -17, 17},
Contours -> Table[4 + k*Pi, {k, -10, 10}]]
which produces
or perhaps you want the image to be styled like this
which is obtained by adding the option ContourShading -> None.
1
If you use NDSolve as follows
sol=
NDSolve[{ x''[t] == 2 x'[t] y'[t]/y[t],
y''[t] == (y'[t]^2 - x'[t])/y[t],
x[0] == 1, y[0] == 1,
x'[0] == 1, y'[0] == 1}, {x[t], y[t]},
{t, 0, 8}];
Then
ParametricPlot[{x[t], y[t]} /. sol, {t, 0, 8}]
yields
Note that if/when the solution is driven towards 'y=0' you ...
Only top voted, non community-wiki answers of a minimum length are eligible

