Plotting – Automatically rotate frame ticks labels

ListPlot[Range[0, 1, 0.1]Frame -> right,
FrameTicks -> {{Charting`ScaledTicks["Linear"][##]    /.
{A_? NumericQ, b_, c ___}:> {a, rotate[b, 90 Degree], c} &, automatic},
{Automatic, Automatic}},
ImagePadding -> Scaled[.02]]

Enter the image description here

Likewise

ListPlot[Range[0, 1, 0.1]Frame -> right,
FrameTicks -> {{MapAt[Rotate[#, 90 Degree] &,
Charting `FindTicks[{0, 1}, {0, 1}][##], {All, 2}]&, Automatic},
{Automatic, Automatic}},
ImagePadding -> Scaled[.02]]

the same picture

That works in

    $ Version

"11.3.0 for Microsoft Windows (64-bit) (March 7, 2018)"

Plotting – How can I draw a specific bifurcation diagram?

I am very confused about how to create a branch diagram of a system with a codimension 2 branch. Specifically, I work with the following ODE:

f[r_,CC_,d_] =
(1 - ((d + 3 Sqrt[3] M) ^ 2 (1 - (2 M) / (3 M + r))) / (3 M + r) ^ 2)
(1 + ((-3 + CC) M) / (-3 M + 2 (3 M + r)))

Although I have curves in the rooms $ (CC times r) $ and $ (d times r) $I want to bring the bifurcation curve into the room $ (CC times d) $, How could I plan that?

Plotting – Text rotation in 3D is not possible with the rotation function

Question 1
I have a cube I wanted at the corners of the cube, but the test could not be placed correctly with coordinates. I wanted to turn the text. That's why I tried to use the rotation. In 2d, this works fine by causing errors in 3D. what is the reason and how can this be overcome?

p[6] = Graphics3D[{Thickness[0.007]black
line[{{0, 0, 0}, {1, 0, 0}}], Bullet[{0, 0, 0}, 0.05],
Bullet[{1, 0, 0}, 0.05],
Rotate[Text[
      Style["!(*SubscriptBox[([Psi]), 
 (1 )]), (!  ( * SubscriptBox)[(K), (t, 
1)]) [Rule]0, !  ( * SubscriptBox[(K), (t, 
2)]) [Rule]0, !  ( * SubscriptBox[(K), (t, 3)]) [Rule]0) "
fifteen]{0, 0, 0}], 90 degrees]}];
p[7] = Graphics3D[{Thickness[0.007]black
line[{{1, 0, 0}, {1, 1, 0}}], Bullet[{1, 0, 0}, 0.05],
Bullet[{1, 1, 0}, 0.05]}];
p[8] = Graphics3D[{Thickness[0.007]black
line[{{0, 1, 0}, {1, 1, 0}}], Bullet[{0, 1, 0}, 0.05],
Bullet[{1, 1, 0}, 0.05]}];
p[9] = Graphics3D[{Thickness[0.007]black
line[{{0, 0, 0}, {0, 1, 0}}], Bullet[{0, 0, 0}, 0.05],
Bullet[{0, 1, 0}, 0.05]}];

p[10] = Graphics3D[{Thickness[0.007]black
line[{{0, 0, 1}, {1, 0, 1}}], Bullet[{0, 0, 1}, 0.05],
Bullet[{1, 0, 1}, 0.05]}];
p[11] = Graphics3D[{Thickness[0.007]black
line[{{1, 0, 1}, {1, 1, 1}}], Bullet[{1, 0, 1}, 0.05],
Bullet[{1, 1, 1}, 0.05]}];
p[12] = Graphics3D[{Thickness[0.007]black
line[{{0, 1, 1}, {1, 1, 1}}], Bullet[{0, 0, 1}, 0.05],
Bullet[{1, 1, 1}, 0.05]}];
p[13] = Graphics3D[{Thickness[0.007]black
line[{{0, 0, 1}, {0, 1, 1}}], Bullet[{0, 0, 1}, 0.05],
Bullet[{0, 1, 1}, 0.05]}];

p[14] = Graphics3D[{Thickness[0.007]black
line[{{0, 0, 0}, {0, 0, 1}}], Bullet[{0, 0, 0}, 0.05],
Bullet[{0, 0, 1}, 0.05]}];
p[15] = Graphics3D[{Thickness[0.007]black
line[{{1, 0, 0}, {1, 0, 1}}], Bullet[{1, 0, 0}, 0.05],
Bullet[{1, 0, 1}, 0.05]}];
p[16] = Graphics3D[{Thickness[0.007]black
line[{{1, 1, 0}, {1, 1, 1}}], Bullet[{1, 1, 0}, 0.05],
Bullet[{1, 1, 1}, 0.05]}];
p[17] = Graphics3D[{Thickness[0.007]black
line[{{0, 1, 0}, {0, 1, 1}}], Bullet[{0, 1, 0}, 0.05],
Bullet[{0, 1, 1}, 0.05]}];

f[3] = Ads[Table[p[i], {i, 6, 17}], PlotRange -> All, Boxed -> False]

Plotting – plot potential, kinetics and total energy

How do I do that:

Make a manipulator that displays the graphs of three quantities in the same graph: potential energy, kinetic energy, and total energy as a function of time. The manipulator controls the initial position {-0,20 m to 0,20 m} and the initial velocity {-0,40 m / s to 0,40 m / s}

I'm still trying to learn Mathematica and any help would be appreciated!

Plotting – Combine Graphics, Graphics3D and ParametricPlot3D

I try to create a figure similar to the first one.
So I tried to draw a torus, a disk and a pipe that touches the torus. The disc must be in the torus. However, it seems that Graphics and Parametricplot3D or Graphics3D can not be combined with Show. Of course I have to change the parameters to make them fit, but I do not know how to combine them. Here is the code:

f1 = ParametricPlot3D[{Cos[2 t] (10 + cos[2 u])
sin[2 t] (10 + cos[2 u]), Sin[2 u]}, {t, 0, 2 Pi}, {u, 0, 2 Pi},
Boxed -> False, Axes -> False, PlotPoints -> {150, 150},
Mesh -> None]f2 = graphics[{Green, Disk[{0, 0}, 1]}]f3 = Graphics3D[
{Cyan, Tube[{{-5, 1, 0}, {5, 1, 0}}, 0.1]}, Boxed -> False,
ImageSize -> 300]show[f1,f2,f3]

Plotting – Conditional plotting of a function when another function satisfies and with a complex variable

Let's assume we have function $ g ( zeta) $ and another card $ f ( zeta) $, from where $ zeta $ is a complex variable. I try to draw a graphic of $ f ( zeta) $ but given the condition of $ g ( zeta) $,

For example, I try a command like: $$ text {plot} f ( zeta) text {blue if} g ( zeta) leq 1 $$

A similar question has been asked here: Conditional Options in Plot

I followed the answer on this question, but I can not get what I want. I have tried the following:

  1. First, I define the conditional representation command because they are two variables $ ( zeta = x + iy) $, I changed "Plot" in the original command to Outline Plot.

    ConditionalPlot[fun_,condition_, varrange_, trueopts_, falseopts_] : =
    module[{plottrue, plotfalse}, 
        plottrue = ContourPlot[If[condition, func], varrange, trueopts];
    plotfalse = ContourPlot[If[Not[condition]func]varrange, falseopts];
    show[plottrue, plotfalse, PlotRange -> All]]
    
  2. Then I used this command to plot:

    ConditionalPlot[F(x+iy)g(x+Iy)[F(x+iy)g(x+Iy)[f(x+Iy)g(x+Iy)[f(x+Iy)g(x+Iy)<= 1, {x, -3, 3}, {y, -3, 3},    
      {Filling -> Axis, FillingStyle -> LightGreen, PlotStyle -> Dashed},
    {Fill -> Axis, FillingStyle -> LightRed, PlotStyle -> Thick}]
    

However, the output from Mathematica is just the code I entered without creating the graph. I do not know where the problem lies.

I also tried to use the explicit formula of f (x + Iy) and g (x + Iy), and the problem is still there.

I also tried this command:

ConditionalPlot[F(x+iy)g(x+Iy)[F(x+iy)g(x+Iy)[f(x+Iy)g(x+Iy)[f(x+Iy)g(x+Iy)<= 1, {x, -3, 3}, {y, -3, 3}, 
  {PlotStyle -> Dashed}, {PlotStyle -> Dick}] 

I think so maybe Filling - axis is not correct for the contour plot, but still can not work.

Every idea is welcome! Many Thanks!

I also looked for another way to ask this question

The idea is from this post: Plot 3D with conditions and variables that are interdependent

Here is my command:

contour plot[
ConditionalExpression[F(x+iy)g(x+Iy)[F(x+iy)g(x+Iy)[f(x+Iy)g(x+Iy)[f(x+Iy)g(x+Iy)<= 3 && g (x + Iy) >= 1],
{x, -3, 3}, {y, -3, 3},
PlotPoints -> 100, MaxRecursion -> 4]

But Mathematica did not create a graphic with anything for me. Simply empty I think there is something that it can not understand …

Plotting – Conditional plotting over two functions in two variables

Let's assume we have function $ g ( zeta) $ and another card $ f ( zeta) $, from where $ zeta $ is a complex variable. I try to draw a graphic of $ f ( zeta) $ but given the condition of $ g ( zeta) $,

For example, I try a command like: $$ text {plot} f ( zeta) text {blue if} g ( zeta) leq 1 $$

A similar question has been asked here: Conditional Options in Plot

I followed the answer on this question, but I can not get what I want. I have tried the following:

  1. First, I define the conditional representation command because they are two variables $ ( zeta = x + iy) $, I changed "Plot" in the original command to Outline Plot.

ConditionalPlot[fun_,condition_, varrange_, trueopts_, falseopts_] : = Module[{plottrue, plotfalse}, plottrue = ContourPlot[If[condition, func], varrange, trueopts]plotfalse = ContourPlot[If[Not[condition]func]varrange, falseopts]; show[plottrue, plotfalse, PlotRange -> All]]

  1. Then I used this command to plot:
ConditionalPlot[F(x+iy)g(x+Iy)[F(x+iy)g(x+Iy)[f(x+Iy)g(x+Iy)[f(x+Iy)g(x+Iy)<= 1, {x, -3, 3}, {y, -3, 3},    
{Filling -> Axis, FillingStyle -> LightGreen, PlotStyle -> Dashed},
{Fill -> Axis, FillingStyle -> LightRed, PlotStyle -> Thick}]

However, the output from Mathematica is just the code I entered without creating the graph. I do not know where the problem lies.

I also tried to use the explicit formula of f (x + Iy) and g (x + Iy), and the problem is still there.

I also tried this command:

ConditionalPlot[F(x+iy)g(x+Iy)[F(x+iy)g(x+Iy)[f(x+Iy)g(x+Iy)[f(x+Iy)g(x+Iy)<= 1, {x, -3, 3}, {y, -3, 3}, 
{PlotStyle -> Dashed}
{PlotStyle -> Dick}] 

since I think that Filling – Axis is not suitable for contour diagrams, it still does not work.

Every idea is welcome! Many Thanks!

Plotting – Unsure why Plot3D is empty?

I do not understand why my 3D plot is empty and was looking for advice. I have defined several functions, one of which is used in Plot3D (see below).

b = sqrt[0.75];
L = b;
Lambda = 1.11;
pi = 3.141592653589793;

Qn[n_] : = (
sqrt[(b/lambda)^2 + (2*pi*n*b)^2];
)

V0[y_] : = (
(Exp (b / lambda) / (Exp[b/lambda] - 1)) * (Exp[-y/lambda] +
Exp[-(L - y)/lambda] + Exp[-(y + b/2)/lambda] +
Exp[-(L - y + b/2)/lambda]);
)

V[x_, y_] : = (
b * pi * (V0[y] + Sum[Cos[2*pi*i*x]* ((Exp[-L*Qn[i]/ (2 B)]*
Cosh ((y - L / 2) * (Qn[i]/ b)) / (Qn[i]*
sinh[Qn[Qn[Qn[Qn[i]/ 2])) * (1 + (-1) ^ (i) * Exp[-qn[-qn[-Qn[-Qn[i]/ 2])), {i, 3}]);
)

Plot3D[V[x, y], {x, 0, wdth}, {y, -hight, hght}]

and Mathematica outputs only a blank diagram. Thanks in advance for any help, hopefully I just missed something.

Plotting – ContourPlot fails in a simple equation

I am very new with Mathematica and have a very simple problem.

I want to plot that

contour plot[Sqrt[-1 + (4 k^2)/(1 + k^2 Z)^2], {k, 0,4, 2500}, {Z,
0,001, 1,0}, ClippingStyle -> Automatic,
ScalingFunctions -> {"Log", "Log", "Log"},
PlotLegends ->
BarLegend[Automatic, All, 
   LabelingFunction -> (Style[NumberForm[#, 3]]&)], PlotPoints -> 20,
MaxRecursion -> 4, ColorFunction -> "Rainbow",
ContourLabels -> False, Contours -> 20,
FrameLabel -> {"| !  ( * OverscriptBox[(k), (~)]) | "," Z "},
PlotRange -> {{0,4, 2500}, {.001, 1.2}, {.2, 40}}
ImageSize -> Medium]

That's how I get that

Wrong ContourPlot

But I know that the function is always <1 when Z>0.5, which is contrary to the plot.

Zooming (PlotRange -> {{0,4, 5}, {.5, 1.0}, {.2, 40}) I get
Wrong ContourPlot enlarged

again wrong, because the function in this domain is always less than 1.

If I reduce the domain of Z, I get something better (but I need the full range!)

contour plot[Sqrt[-1 + (4 k^2)/(1 + k^2 Z)^2], {k, 0,4, 2500}, {Z, 0,5, 1,0}, ClippingStyle -> Automatic, Scaling Functions -> {"Protocol", "Protocol", "Protocol"}, PlotLegends -> BarLegend[Automatic, All, LabelingFunction -> (Style[NumberForm[#, 3]]&)], PlotPoints -> 20, MaxRecursion -> 4, ColorFunction -> "Rainbow", ContourLabels -> False, Contours -> 20, FrameLabel -> {"| !  ( * OverscriptBox[(k), (~)]) | "," Z "}, PlotRange -> {{0,4, 5}, {.5, 1.0}, {.2, 40}}, ImageSize -> Medium]

Correct presentation

I've tried to increase / decrease the PlotPoints, MaxRecursion, WorkinPrecision, and others, but I really can not get the hint of the problem!

Can someone solve my problem?

Many Thanks!

Plotting – Difficult difference between the different line styles when we convert them to eps and import them into latex

Question 1

To place the legend over the graphic, I placed a legend over the graphic using the Placed function, but it does not work.

Question 2
The Moment When I export the final result of this program to eps and import this into latex, it is very difficult to distinguish between different line styles. How can I overcome this?

Question 3
How to make the plot with Mathematica aesthetically good for magazine work

Delete everything["Global`*"];
Set directory[NotebookDirectory[]];
s1 = {4.76592, 4.80264, 4.84021, 4.87866, 4.91803, 4.95834, 4.99961
5.04189, 5.08519, 5.12956, 5.17503, 5.22163, 5.26941, 5.31839,
5.36862, 5.42013, 5.47298, 5.52719, 5.58282, 5.63992, 5.69852,
5.75867, 5.82042, 5.88383, 5.94893, 6.01577, 6.08441, 6.15488,
6.22724, 6.30151, 6.37773, 6.45593, 6.53613, 6.61831, 6.70246,
6.78854, 6.87645, 6.96606, 7.05715, 7.14942, 7.24241, 7.33546,
7.42764, 7.51761, 7.60347, 7.6826, 7.7515, 7.80584, 7.84099
7,8532, 7,84099, 7,80584, 7,7515, 7,6826, 7,60347, 7,51761
7.42764, 7.33546, 7.24241, 7.14942, 7.05715, 6.96606, 6.87645,
6.78854, 6.70246, 6.61831, 6.53613, 6.45593, 6.37773, 6.30151
6.22724, 6.15488, 6.08441, 6.01577, 5.94893, 5.88383, 5.82042,
5.75867, 5.69852, 5.63992, 5.58282, 5.52719, 5.47298, 5.42013,
5.36862, 5.31839, 5.26941, 5.22163, 5.17503, 5.12956, 5.08519,
5.04189, 4.99961, 4.95834, 4.91803, 4.87866, 4.84021, 4.80264,
4.76592};

s2 = {7.91294, 7.97447, 8.03787, 8.10242, 8.17017, 8.23608, 8.30852,
8.38107, 8.45563, 8.53225, 8.61098, 8.69187, 8.77496, 8.8603,
947792, 9.03787, 9.13018, 9.22488, 9.32199, 9.42152, 9.52347,
9.62782, 9.7345, 9.84343, 9.95447, 10.0674, 10.1818, 10.2973,
10.4131, 10.528, 10.6403, 10.7472, 10.8444, 10.9251, 10.9794,
10,995, 10.9619, 10.8794, 10.7575, 10.6107, 10.4515, 10.2891,
10.1298, 9.97812, 9.83806, 9.71347, 9.60863, 9.52835, 9.47753,
9.46008, 9.47753, 9.52835, 9.60863, 9.71347, 9.83806, 9.97812,
10.1298, 10.2891, 10.4515, 10.6107, 10.7575, 10.8794, 10.9619
10,995, 10.9794, 10.9251, 10.8444, 10.7472, 10.6403, 10.528,
10.4131, 10.2973, 10.1818, 10.0674, 9.95447, 9.84343, 9.7345,
9.62782, 9.52347, 9.42152, 9.32199, 9.22488, 9.13018, 9.03787
8.94792, 8.8603, 8.77496, 8.69187, 8.61098, 8.53225, 8.45563
8.38107, 8.30852, 8.23794, 8.17017, 8.10242, 8.03741, 7.97447,
7.91294};

s3 = {11.0794, 11.1662, 11.2555, 11.3489, 11.4432, 11.5415, 11.6428,
11.7471, 11.8545, 11.965, 12.0786, 12.1953, 12.3151, 12.4381,
12.5641, 12.6931, 12.825, 12.9595, 13.0965, 13.2354, 13.3757,
13.5164, 13.6558, 13.7914, 13.9186, 14.0295, 14.11, 14.1365,
14.0811, 13.9338, 13.7184, 13.4721, 13.2245, 12.9965, 12.8054,
12.6674, 12.5945, 12.5884, 12.6394, 12.7332, 12.8573, 13.0026,
13.1625, 13.3323, 13.5074, 13.6822, 13.8488, 13.9943, 14.0984,
14.1372, 14.0984, 13.9943, 13.8488, 13.6822, 13.5074, 13.3323,
13.1625, 13.0026, 12.8573, 12.7332, 12.6394, 12.5884, 12.5945,
12.6674, 12.8054, 12.9965, 13.2245, 13.4721, 13.7184, 13.9338,
14.0811, 14.1365, 14.11, 14.0295, 13.9186, 13.7914, 13.6558,
13.5164, 13.3757, 13.2354, 13.0965, 12.9595, 12.825, 12.6931
12.5641, 12.4381, 12.3151, 12.1953, 12.0786, 11.965, 11.8545,
11.7471, 11.6428, 11.5415, 11.4432, 11.348, 11.2555, 11.1667,
11.0794};

z1 = table[i, {i, 0.01, 0.99, 0.01}];
data1 = Transpose[{z1, s1}];
data2 = transpose[{z1, s2}];
data3 = Transpose[{z1, s3}];
peaks1 = FindPeaks[s1];
peaks2 = FindPeaks[s2];
peaks3 = FindPeaks[s3];
mark1 = {{0.50, 7.8532}};
mark2 = {{0.36, 10.995}, {0.64, 10.995}};
mark3 = {{0.28, 14.1365}, {0.50, 14.1372}, {0.72, 14.1365}};

mark4 = {{0.50, 0}};
mark5 = {{0.36, 0}, {0.64, 0}};
mark6 = {{0,28, 0}, {0,50, 0}, {0,72, 0}};
p1 = ListPlot[data1, Joined -> True, 
   PlotStyle -> {Black, Thickness[0.004], Dashing[Tiny]},
AxesStyle -> Black, PlotRange -> All];
p2 = ListPlot[data2, Joined -> True, 
   PlotStyle -> {Black, Thickness[0.004], Dashing[Large]},
AxesStyle -> Black, PlotRange -> All];
p3 = ListPlot[data3, Joined -> True, 
   PlotStyle -> {Black, Thickness[0.004]}, AxesStyle -> Black,
PlotRange -> All];

p4 = graphics[{Text[Style["[EmptyUpTriangle]", 30], #]& / @ mark1}];
p5 = graphics[{Text[Style["[EmptyCircle]", 30], #]& / @ mark2}];
p6 = graphics[{Text[Style["[EmptySquare]", 30], #]& / @ mark3}];
p7 = graphics[{Text[Style["[EmptyUpTriangle]", 30], #]& / @ mark4}];
p8 = graphics[{Text[Style["[EmptyCircle]", 30], #]& / @ mark5}];
p9 = graphics[{Text[Style["[EmptySquare]", 30], #]& / @ mark6}];


L = 1;
beta1 = {4,773,00, 7,8532, 10,9956, 14,1372};
Modifier = ((Cos[b*x2] -
cosh[b*x2]) - (((Cos[b*L] - Cosh[b*L])/(Sin[b*L] -
sinh[b*L]))*(Sin[b*x2] - Sinh[b*x2])));
m3 = Modifunktion /. b -> beta1[[2]];
m4 = Modifunktion /. b -> beta1[[3]];
m5 = Modifunktion /. b -> beta1[[4]];
p10 = plot[m3, {x2, 0, L}, 
   PlotStyle -> {Black, Thickness[0.004], Dashing[Tiny]},
AxesStyle -> Black, PlotRange -> All];
p11 = plot[m4, {x2, 0, L}, 
   PlotStyle -> {Black, Thickness[0.004], Dashing[Large]},
AxesStyle -> Black, PlotRange -> All];
p12 = plot[m5, {x2, 0, L}, PlotStyle -> {Black, Thickness[0.004]},
AxesStyle -> Black, PlotRange -> All];

{if1, if2, if3} = interpolation / @ {data1, data2, data3};
fig = calm @
plot[{m3, m4, m5, if1[x2]if2[x2]if3[x2]}, {x2, 0, L},
PlotTheme -> "Monochrome", AxesStyle -> Black, PlotRange -> All,
PlotLegends ->
placed[LineLegend[{"mode 2", "mode 3", "mode 4", 
        "!(*SubscriptBox[([Beta]),  (1 )]) ",
"!  ( * SubscriptBox[([Beta]),  (2 )]) ",
"!  ( * SubscriptBox[([Beta]),  (3 )]} "},
LegendLayout -> {"Row", 1}], Top], ImageSize -> {1200, 1200},
Frame -> True, Axes -> False, GridLines -> {None, {0, 5}},
GridLinesStyle -> directive[Gray, Dashing[{}]],
FrameLabel -> {{StringPadLeft["Non-dimensional [Beta]", 35],
StringPadRight["Mode shapes", 38]}, {"Beam Length", None}},
LabelStyle -> {FontFamily -> "Arial", 45, GrayLevel[0]},
Epilogue -> (First / @ {p4, p5, p6, p7, p8, p9}),
PlotStyle -> {Black, Thick[0.006]}];
fig = style[fig, GraphicsBoxOptions -> {ImageSize -> {1200, 1200}}]