Group Abstract Group Abstract

Message Boards Message Boards

0
|
6.2K Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

[?] Use Epilog in Manipulate?

Posted 7 years ago
POSTED BY: Jos Klaps
2 Replies
POSTED BY: Jos Klaps
Posted 7 years ago

Jos,

None is an option value, it cannot be used as a graphics primitive. Use an empty list instead.

Manipulate[
 ListLinePlot[data2, 
  Epilog -> 
   If[points == "No Points", {}, 
    If[points == "Points", {PointSize[0.04], Red, 
      Point[data2]}]]], {points, {"No Points", "Points"}}]

For this situation, I find it easier to read using Which rather than nested If.

Manipulate[
 ListLinePlot[data2, 
  Epilog -> 
   Which[points == "No Points", {}, 
         points == "Points", {PointSize[0.04], Red, Point[data2]}]], 
 {points, {"No Points", "Points"}}]
POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard