# Why is my plot looking different than the author's plot? [closed]

I am plotting the equation

4 Sqrt x^7 + x^6 (4 - 3 y^2) + 2 Sqrt x^5 (-70 + 9 y^2) +
4 Sqrt x^3 (-513 - 19 y^2 + 6 y^4) +
2 Sqrt x (-170 - 1263 y^2 + 68 y^4 + 5 y^6) ==
9 x^4 (156 - 13 y^2 + y^4) + (3 + y^2) (-388 + 963 y^2 - 82 y^4 +
3 y^6) + x^2 (3860 + 2013 y^2 - 186 y^4 + 9 y^6)


using ContourPlot. This is the plot I got However in a published paper, the author got Where do the two lines at the right come from in my plot.

## closed as unclear what you're asking by corey979, Feyre, Simon Woods, MarcoB, gpapNov 21 '16 at 4:06

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• With ContourPlot you can wite: ContourPlot[f==g,{x,xmin,xmax},{y,ymin,ymax}] (see: reference.wolfram.com/language/ref/ContourPlot.html ) so maybe the author used a different value for g. – mattiav27 Nov 20 '16 at 9:03
• Are you saying that you do not trust the result you got? If yes, have you tried plotting this in any other way to verify it? Make a Plot3D. Or plot a section at x==9. There are many ways. – Szabolcs Nov 20 '16 at 9:24
• @Szabolcs, I did make Plot3D but I am not sure whether the graph matches mine or the author's. – MrDi Nov 20 '16 at 9:30
• If you plot the section I suggested, it will be clear that the contour plot you get is correct. – Szabolcs Nov 20 '16 at 9:58
• I don't think this is a well-posed question. The OP asks about why some author, in some paper, using some method achieved his/her result. How could we know what the author had in mind? – corey979 Nov 20 '16 at 10:25

eqn = 4 Sqrt x^7 + x^6 (4 - 3 y^2) + 2 Sqrt x^5 (-70 + 9 y^2) +
4 Sqrt x^3 (-513 - 19 y^2 + 6 y^4) +
2 Sqrt x (-170 - 1263 y^2 + 68 y^4 + 5 y^6) ==
9 x^4 (156 - 13 y^2 + y^4) + (3 + y^2) (-388 + 963 y^2 - 82 y^4 + 3 y^6) +
x^2 (3860 + 2013 y^2 - 186 y^4 + 9 y^6);


Solving for y

solns = Solve[eqn, y, Reals] // Normal;

Length[solns]

(*  6  *)


The solution has six segments (three mirrored pairs)

Plot[Evaluate[y /. solns], {x, -9, 9},
PlotRange -> {{-9, 9}, {-9, 9}},
Frame -> True,
AspectRatio -> 1,
PlotLegends -> Automatic] You wish to delete the last two solutions.

EDIT: Added Filling

Plot[Evaluate[y /. solns[[1 ;; 4]]], {x, -9, 9},
PlotRange -> {{-9, 9}, {-9, 9}},
PlotStyle -> Blue,
Frame -> True,
AspectRatio -> 1, BaseStyle -> {FontSize -> 16, FontWeight -> Bold},
Filling -> 1 -> {2}] • You forgot to fill in the closed curved in the middle :P – anderstood Nov 20 '16 at 18:07
• @anderstood - added Filling – Bob Hanlon Nov 20 '16 at 18:26
• a bit aside i suppose but that filled region is not a solution, so why should it be filled? – george2079 Nov 20 '16 at 19:39
• @george2079 - only because the OP requested reproducing a given plot – Bob Hanlon Nov 20 '16 at 19:43

From looking at the two intersecting surfaces in 3D, I conclude that the lines you want to eliminate from your contour plot belong there.

Plot3D[
{4 Sqrt x^7 + x^6 (4 - 3 y^2) +
2 Sqrt x^5 (-70 + 9 y^2) +
4 Sqrt x^3 (-513 - 19 y^2 + 6 y^4) +
2 Sqrt x (-170 - 1263 y^2 + 68 y^4 + 5 y^6),
9 x^4 (156 - 13 y^2 + y^4) +
(3 + y^2) (-388 + 963 y^2 - 82 y^4 + 3 y^6) +
x^2 (3860 + 2013 y^2 - 186 y^4 + 9 y^6)},
{x, -5, 10}, {y, -10, 10},
Boxed -> False,
Axes -> None,
SphericalRegion -> True,
ClippingStyle -> None,
PlotPoints -> 100,
Lighting -> "Neutral",
ImageSize -> 450] Presuming you agree to keep the lines, you can improve the look of your contour plot by giving a few options:

ContourPlot[
4 Sqrt x^7 + x^6 (4 - 3 y^2) + 2 Sqrt x^5 (-70 + 9 y^2) +
4 Sqrt x^3 (-513 - 19 y^2 + 6 y^4) +
2 Sqrt x (-170 - 1263 y^2 + 68 y^4 + 5 y^6) ==
9 x^4 (156 - 13 y^2 + y^4) +
(3 + y^2) (-388 + 963 y^2 - 82 y^4 + 3 y^6) +
x^2 (3860 + 2013 y^2 - 186 y^4 + 9 y^6),
{x, -10, 10}, {y, -10, 10},
PlotPoints -> 50,
Axes -> True,
AxesStyle -> Dotted] The extra plot points are needed to properly show the two cusps at x = 5.53423, y = ±5.