Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.8K Views
|
5 Replies
|
1 Total Like
View groups...
Share
Share this post:

Range of Gridlines

Posted 5 years ago

Is it possible to limit the length of the lines. In my case, I want to constrain the red and blue lines before they intersect. And mark their intersection with a dot and sign the red Amah and the blue Arez.

POSTED BY: Sanzhar Mukatay
5 Replies
Posted 5 years ago

Hi Sanzhar,

Use Epilog rather than GridLines. e.g. with only the vertical lines

Plot[{Subscript[A, max], Subscript[A, n0], Subscript[A, n2], Subscript[A, n3]}, {p, 0, 550}, 
 PlotStyle -> {{Thick}, {Dashed}, {Dashed}, {Dashed}},
 AxesLabel -> {p[c^-1], A[ΠΌ]},
 PlotRange -> {0, 0.007},
 PlotLegends -> 
  LineLegend[{Subscript[n, 1], Subscript[n, 0], Subscript[n, 2], Subscript[n, 3]}],
 Epilog -> {
   {Blue, Dashed, Line[{{pmax, 0}, {pmax, maxA}}], PointSize[Medium], 
    Point[{pmax, maxA}], 
    Text["Arez", {pmax, maxA} + {15, 0.05*maxA}], {Red, Dashed, 
     Line[{{k, 0}, {k, Subscript[A, rez]}}], PointSize[Medium], 
     Point[{k, Subscript[A, rez]}], 
     Text["Amah", {k, Subscript[A, rez]} + {-25, 0.05*maxA}]}}
   }]

enter image description here

POSTED BY: Rohit Namjoshi

How to keep horizontal lines to exactly show the intersection of 2 lines?

POSTED BY: Sanzhar Mukatay
Posted 5 years ago

The points of intersection are known, so just add those line segments to the Epilog e.g. to draw the horizontal red line.

{Red, Dashed, Line[{{k, 0}, {k, Subscript[A, rez]}}], 
 Line[{{0, Subscript[A, rez]}, {k, Subscript[A, rez]}}], 
 PointSize[Medium], Point[{k, Subscript[A, rez]}], 
 Text["Amah", {k, Subscript[A, rez]} + {-25, 0.05*maxA}]}

enter image description here

POSTED BY: Rohit Namjoshi

Ok, thank you very much.

POSTED BY: Sanzhar Mukatay

Here's a graph that's turned out. Thank you more for helping me.

POSTED BY: Sanzhar Mukatay
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard