Group Abstract Group Abstract

Message Boards Message Boards

0
|
4.4K Views
|
4 Replies
|
1 Total Like
View groups...
Share
Share this post:

Place a point on a plot?

Posted 9 years ago

I'm working on a Mac (OS X 10.10.5) in the Wolfram Desktop (11.0.1.0).

I'm using code like the snippet below to draw a plot of a function.

pic = Plot[(.25 x)^3 + (-.4 x)^2 - 2, {x, -10, 10}, AspectRatio -> 1, ImageSize -> {{480}, {540}}];

The function rule is determined at runtime. In addition to the curve of the function, I would like the plot to show a point or two with labels like "A".That's what I'm having trouble figuring out. I found an example in the docs for placing labels in a Plot[], but not for placing points. For instance, in the plot drawn by the code above, I might want to place a point at the y-intercept or at some other place along the function's curve.

Thanks in advance,

Mark Greenberg

POSTED BY: Mark Greenberg
4 Replies
Posted 9 years ago

This also seems to be what I need. Thanks, Gianluca. As I go forward, I will try to gain an understanding of both Show[] and Epilog->.

POSTED BY: Mark Greenberg

Another way is with Epilog:

Plot[(.25 x)^3 + (-.4 x)^2 - 2, {x, -10, 10}, AspectRatio -> 1, 
 ImageSize -> {{480}, {540}},
 Epilog -> {PointSize[Large], Point[{0, 0}]}]
POSTED BY: Gianluca Gorni
Posted 9 years ago

That's just what I needed. Thanks! (I didn't even know the function Show[] existed.)

POSTED BY: Mark Greenberg

Use Point and then combine it with the plot using Show.

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