1
$\begingroup$

I'm new to Mathematica. I have a Plot that I would like to divide evenly at the y-axis. I can divide evenly at x-axis if I set the min and max range of x.

But, how do I do that at the y-axis, and how do I show the midpoint (x,y values) of each graph?

I would like to show part of the graph when for eg: Plot situation at y-axis from 0-0.2 / 0.2-0.4 / 0.4-0.6 and so forth...but without changing the plotrange that have been set

Here is the code

k = 155900;
F3 = Plot[
  Sqrt[2] √(√(1/m1^2 + 
         20 Sqrt[3118] (1/m1)^(3/2) Sqrt[1/50] + 
         3118020 Sqrt[3118] Sqrt[1/m1] (1/50)^(3/2) + 
         24304810001/50^2 + 623602/(m1 50)) - 
      10 Sqrt[3118] Sqrt[1/m1] Sqrt[1/50] - k/50)
  , {m1, 5, 500}
  , PlotRange -> {{0, 500}, {0, 1}}
  , AxesLabel -> {m1, SuperStar[E]}
  ]

The graph

$\endgroup$
  • 1
    $\begingroup$ "divide evenly at y-axis" - this is unclear; please clarify what you actually want to achieve. $\endgroup$ – corey979 May 31 '17 at 14:57
  • $\begingroup$ I would like to show part of the graph when for eg: graph situation at y-axis from 0-0.2/ 0.2-0.4/ 0.4-0.6/ and so forth. Sorry for my english. I tried to clarify as best as I can. $\endgroup$ – Ahmad Ruzaini 禅 May 31 '17 at 15:15
  • $\begingroup$ k is undefined. $\endgroup$ – corey979 May 31 '17 at 15:25
  • $\begingroup$ lets say k value is 155900 $\endgroup$ – Ahmad Ruzaini 禅 May 31 '17 at 15:42
  • $\begingroup$ Maybe you can change the ticks distribution of the y-axis using the package CustomTicks scidraw.nd.edu/levelscheme/CustomTicksGuide.pdf $\endgroup$ – robson denke May 31 '17 at 15:42
1
$\begingroup$

Perhaps this will work for you.

With[{k = 155900},
  Column[
    Table[
      Plot[
        Sqrt[2] 
          Sqrt[
            Sqrt[1/m1^2 + 20 Sqrt[3118] (1/m1)^(3/2) Sqrt[1/50] + 
              3118020 Sqrt[3118] Sqrt[1/m1] (1/50)^(3/2) + 
              24304810001/50^2 + 623602/(m1 50)] - 
            10 Sqrt[3118] Sqrt[1/m1] Sqrt[1/50] - k/50], 
        {m1, 5, 500},
        PlotRange -> {All, interval},
        AxesLabel -> {m1, SuperStar[E]}],
      {interval, Partition[Range[0., .6, .2], 2, 1]}]]]

plots

$\endgroup$
0
$\begingroup$
k = 155900;
GraphicsColumn@Table[
  Show[Plot[
    Sqrt[2] \[Sqrt](\[Sqrt](1/m1^2 + 
           20 Sqrt[3118] (1/m1)^(3/2) Sqrt[1/50] + 
           3118020 Sqrt[3118] Sqrt[1/m1] (1/50)^(3/2) + 
           24304810001/50^2 + 623602/(m1 50)) - 
        10 Sqrt[3118] Sqrt[1/m1] Sqrt[1/50] - k/50), {m1, 5, 500}, 
    PlotRange -> {{0, 500}, r}, AxesLabel -> {"m1", SuperStar[E]}],
   PlotRange -> {{0, 500}, {0, 1}}, 
   AxesOrigin -> {0, 0}], {r, {{.4, .8}, {.2, .4}, {0, .2}}}]

enter image description here

$\endgroup$
0
$\begingroup$
expr = Sqrt[2] √(√(1/m1^2 + 20 Sqrt[3118] (1/m1)^(3/2) Sqrt[1/50] + 
     3118020 Sqrt[3118] Sqrt[1/m1] (1/50)^(3/2) + 24304810001/50^2 + 623602/(m1 50)) - 
     10 Sqrt[3118] Sqrt[1/m1] Sqrt[1/50] - k/50);

Using ConditionalExpression:

Row[Plot[ConditionalExpression[expr, # <= expr <= #2], {m1, 5, 500}, 
    PlotRange -> {{0, 500}, {0, 1}}, AxesLabel -> {m1, SuperStar[E]}, 
    ImageSize -> 300] & @@@ {{0.4, 0.8}, {0.2, 0.4}, {0., 0.2}}]

Mathematica graphics

Using MeshFunctions and MeshShading:

Row[Plot[expr, {m1, 5, 500}, MeshFunctions -> {#2 &}, 
    MeshShading -> {None, Blue}, Mesh -> {#},   MeshStyle -> Opacity[0],
    PlotRange -> {{0, 500}, {0, 1}}, AxesLabel -> {m1, SuperStar[E]}, 
    ImageSize -> 300] & /@ {{0.4, 0.8}, {0.2, 0.4}, {0., 0.2}}]

Mathematica graphics

$\endgroup$
  • $\begingroup$ Thank you for the answer. How do I show the midpoint for each of the graph? For eg: for graph 0.6-0.4, it will display the midpoint of x and y coordinates of it in the graph. $\endgroup$ – Ahmad Ruzaini 禅 Jun 7 '17 at 17:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.