Message Boards Message Boards

0
|
2982 Views
|
4 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Manipulating a point in a StreamPlot[ ]?

I'm new to Mathematica. Why doesn't the point in the attached expression appear where I think it should? And is there a way to attach a label to the point showing its coordinates?

Attachments:
POSTED BY: Jay Gourley
4 Replies

Thanks again, Rohit Namjoshi. That worked too. It also shows that Manipulate only manipulates variables if the variable definition is within its arguments, right?

POSTED BY: Jay Gourley
Posted 3 years ago

This is a bit ugly, but should give you the general idea

Manipulate[
 p = {(1 + Subscript[\[Epsilon], 1 ])/Subscript[\[Epsilon], 
    0 ], (Subscript[\[Epsilon], 0 ] - Subscript[\[Epsilon], 1 ] - 
      1)/(Subscript[\[Epsilon], 
      0 ] (1 + Subscript[\[Epsilon], 1 ]))};
 Show[
  {
   Graphics[
    {AbsolutePointSize[5], Point[p, VertexColors -> Red], Black, 
     Text[ToString@Round[p, 0.01], {First@p, Last@p + .02}]}, 
    PlotRange -> {{dimmin, dimmax}, {dimmin, dimmax}}],
   StreamPlot[
    {1 - s  - Subscript[\[Epsilon], 0 ] i s, 
     Subscript[\[Epsilon], 0 ]
        i s - (1 + Subscript[\[Epsilon], 1 ]) i}, {s, dimmin, 
     dimmax},
    {i, dimmin, dimmax}, StreamStyle -> {Automatic}, 
    StreamColorFunction -> Automatic, FrameLabel -> {s, i}, 
    StreamScale -> Automatic, ImageSize -> Full, Axes -> True, 
    AxesStyle -> Black, LabelStyle -> {13, GrayLevel[0], Bold}]
   }
  ],
 {{Subscript[\[Epsilon], 0 ], 3}, -30, 
  30, .1}, {{Subscript[\[Epsilon], 1 ], 1}, -30, 30, .1}
 ]
dimmin = 0 ; dimmax = 1.1 ;

The second question is very different and should be a separate post.

POSTED BY: Rohit Namjoshi
Posted 3 years ago

Hi Jay,

Overlay does not know anything about the scales involved. Try using Show instead.

POSTED BY: Rohit Namjoshi

Fantastic. That worked. (See attached) Thanks, Rohit Namjoshi.

Next question: Is there a way to attach a label to the point showing its coordinates? And is there a way to created a manipulatable object that can be inserted in applications like Microsoft 365, HTML email messages, or Google Docs?

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

Group Abstract Group Abstract