The following interactive plot causes Mathematica 9 to become unresponsive. Could someone please tell me what is wrong with it?

  tbl1 = Table[
      B + EQ (P - P pfold) + 
       pfold (P + V) + (-1 - 2 EQ (-1 + pfold) + pfold) effS}], {effS,
      0.05, Min[S, T], 0.01}];
  ListLinePlot[{tbl1}, PlotLegends -> {"EV"},  
   PlotStyle -> {Directive[Orange]}, Mesh -> All, 
   MeshStyle -> Opacity[0], GridLines -> {Automatic}, 
   AxesLabel -> {"eff stack", "EV"}]], {{B, 180, "Hero bet"}, 0.05, S,
   0.01, Appearance -> "Labeled"}, {{V, 400, "Villain bet"}, 0.05, T, 
  0.01, Appearance -> "Labeled"}, {{S, 1280, "Hero remaining stack"}, 
  0.05, 10000, 0.01, 
  Appearance -> "Labeled"}, {{T, 870, "Villain remaining stack"}, 
  0.05, 10000, 0.01, Appearance -> "Labeled"}, {{P, 260, "Pot"}, 0.05,
   10000, 0.01, Appearance -> "Labeled"}, {{EQ, 0.25, "Hero Equity"}, 
  0, 100, 0.01, 
  Appearance -> "Labeled"}, {{pfold, 0.5, 
   "Probability villain folds"}, 0, 1, 0.01, Appearance -> "Labeled"}]

closed as too localized by cormullion, Oleksandr R., Yves Klett, m_goldberg, rm -rf Apr 23 '13 at 14:32

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    $\begingroup$ Change {effS,0.05, Min[S, T], 0.01} to {effS,0.05, Min[S, T], 10} seems to work. $\endgroup$ – user0501 Apr 22 '13 at 20:05
  • $\begingroup$ Yes it seems to work but why does the graph x-axis show from -1 to 1 instead of from 0 to min[S,T]? $\endgroup$ – dabd Apr 22 '13 at 20:10
  • $\begingroup$ It's like @user0501 said, you have too MANY points for speedy dynamic refresh. $\endgroup$ – Silvia Apr 22 '13 at 20:13
  • $\begingroup$ I also find the mistake that is causing the axis to show the incorrect range. Thanks for the help. $\endgroup$ – dabd Apr 22 '13 at 20:21

One thing you can do to improve Manipulate speeds is to use ControlActive, which lets you set different behaviours for when a control is being moved and when it isn't.

For example, with this code:

 ControlActive[Take[tbl1, {1, -1, 5000}], 
               Take[tbl1, {1, -1, 50}]]}, 
 PlotLegends -> {"EV"}, 
 PlotStyle -> {Directive[Orange]}, 
 Mesh -> ControlActive[None, All], 
 MeshStyle -> Opacity[0], 
 GridLines -> {Automatic}, 
 AxesLabel -> {"eff stack", "EV"}]] 

you're drawing the first set of data when the sliders are moving, and drawing the second set once they stop. It's now much more responsive.


which is an improvement on my machine, because your original code didn't produce a plot at all before aborting.

Still, I think too many points is still your main problem...


Not the answer you're looking for? Browse other questions tagged or ask your own question.