1

I am a bit puzzled: I wrap the same exact ContoutPlot inside a Manipulate, and it looks all wrong (I don't know what it's drawing but it does not look like the zeros of my polynomial). What am I doing wrong, and how can I correctly wrap my plot inside a Manipulate so that I can later on put a Locator on it that will give me the correct {p,q} values?

myPoly := -4 p^3 - 27 q^2;
PrintPoly[poly_] := ContourPlot[poly == 0, {p, -1, 1}, {q, -1, 1}];
ManiPoly[poly_] := Manipulate[
                       ContourPlot[poly == 0, {p, -1, 1}, {q, -1, 1}],   
                       {point, {1, 1}}
                   ];
ManiPoly[myPoly]
PrintPoly[myPoly]

The funny thing about is that when I first open the notebook, they look the same, but when I actually evaluate the cell, they look like in the attached screenshot (this is a fresh instance of Mathematica 10.0 with no other instances running):

enter image description here

Tobia Tesan
  • 217
  • 1
  • 9

1 Answers1

2

Your screen capture appears to show the ContourPlot frozen in "Speed" mode:

myPoly := -4 p^3 - 27 q^2;

ContourPlot[myPoly == 0, {p, -1, 1}, {q, -1, 1}, PerformanceGoal -> "Speed"]

enter image description here

Normally this should only appear while the controls are being used, after which it should switch to "Quality" mode. See:

I do not see this problem on my system running 10.0.2. I propose setting PerformanceGoal -> "Quality" explicitly:

ManiPoly[poly_] := 
 Manipulate[ContourPlot[poly == 0, {p, -1, 1}, {q, -1, 1}, 
   PerformanceGoal -> "Quality"], {point, {1, 1}}]
Mr.Wizard
  • 271,378
  • 34
  • 587
  • 1,371