I'm trying to plot the solution of Van der Pol's oscillatory equation. However, I encounter a problem each time I combine Callout, ListPlot and ListLinePlot. My Mathematica version (Mathematica 8.0 on 32-bits Computer) continues to breakdown whenever I decide to plot their Legend on the same graph. Actually, Mariusz Iwaniuk has answered me (see Disparateness in Simple pendulum plot) but made use of another version which was not compatible with mine. When I pasted it on my Mathematica version, it failed to work. I tried reaching him but couldn't. Howbeit, I really appreciate him. Now, the particular problem's solution is $y=\sin t$. The question is genuine as we intend to submit the paper soon. I'll also love if more than two plots of $\sin t$ using Callout, ListPlot and ListLinePlot are plotted together. Normally, I need to plot about six solutions of $\sin t$ (same domain) on the same graph and make one legend for all. For intance, here are the codes and graphs


p1 = ListPlot[Table[{i, Sin[i]}, {i, 1, Stepst, 0.5}], 
  PlotMarkers -> {"\[RightTriangle]", 20}, PlotStyle -> {Blue}, 
  AxesLabel -> {"h", "x"}, PlotLabel -> "DATA 1 and DATA 2", 
  PlotLegend -> {"DATA 1"}]

p2 = ListLinePlot[
  Table[{i, Sin[i] + RandomReal[{-0.01, 0.01}]}, {i, 1, Stepst, 0.1}],
   PlotLabels -> {Callout["DATA 1", {Scaled[0.5], Above}]}, 
  PlotLegend -> {"DATA 2"}]


enter image description here

enter image description here

Can anyone provide a solution or an alternative?

  • $\begingroup$ Use the documentation that comes with your version of Mathematica. M8.0 does not support Callout. $\endgroup$ – Szabolcs Mar 6 '18 at 16:21
  • 2
    $\begingroup$ Callout was introduced in v11, so it won't work in your version. $\endgroup$ – rcollyer Mar 6 '18 at 16:30
  • 1
    $\begingroup$ Remove the PlotLabels option, entirely, it's a 10.4 option. Then, it should combine without issue, well you'll still have to move the legends around, and I can't help with that, I don't know the PlotLegends` package. $\endgroup$ – rcollyer Mar 6 '18 at 16:39
  • 2
    $\begingroup$ You could maybe simplify your question, as "How can I do [...] with Mathematica 8"? $\endgroup$ – anderstood Mar 6 '18 at 16:58
  • 1
    $\begingroup$ Don't use uninformative phrases such as "I'm having problems with..." or "Difficulty in using..." in a title. Also, your problem has nothing whatsoever to do with van der Pol's equation, so delete it from the title. $\endgroup$ – David G. Stork Mar 6 '18 at 18:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.