Message Boards Message Boards

1
|
6337 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Weird behavior with Callout and Manipulate

Can anybody explain or reproduce these weird results with Callout and Manipulate.

lets make some data with Callout.

dat = {
   Callout[Table[{x, Sin[x]}, {x, 0, 10, .1}], "Sin"],
   Callout[Table[{x, Cos[x]}, {x, 0, 10, .1}], "Cos"],
   Callout[Table[{x, Abs[Cos[x + 0.5]]}, {x, 0, 10, .1}], "Abs[Cos]"]
   };
dat1 = {
   Callout[Table[{x, Sin[x]}, {x, 0, 10, .1}], "Sin"],
   Callout[Table[{x, Cos[x]}, {x, 0, 10, .1}], "Cos"]
   };

And now try to plot this data.

ListLinePlot[dat]
Manipulate[ListLinePlot[dat], {n, 1, 10}]
Manipulate[ListLinePlot[dat[[1 ;; 2]]], {n, 1, 10}]

enter image description here

Now the weird thing is this works, first creating the plot with only two lines and then in a new cell change the plot data.

enter image description here

However, when doing this in one cell it fails.

enter image description here

This is the error generated.

enter image description here

Attachments:
POSTED BY: Martijn Froeling
2 Replies
Posted 5 years ago

I can confirm that this is a regression in 12.1. We're looking into it, I'll update this thread if I come across a workaround.

POSTED BY: Kyle Martin

Thanks for the confirmation.

POSTED BY: Martijn Froeling
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