1
$\begingroup$
aa1 := Show[Plot[{Tan[x], 0}, {x, 0, t},
    Mesh -> {{0, Pi/8, Pi/4, 3 Pi/8, Pi/2, 5 Pi/8, 3 Pi/4, 7 Pi/8, Pi,
        9 Pi/8, 5 Pi/4, 11 Pi/8, 3 Pi/2, 13 Pi/8, 7 Pi/4, 15 Pi/8, 
       2 Pi, 17 Pi/8}},

    MeshStyle -> {Directive[PointSize[Medium], Blue]}], 
   PlotRange -> {{0, 2 Pi}, {-1.5, 1.5}},
   Ticks -> {{0, Pi/8, Pi/4, 3 Pi/8, Pi/2, 5 Pi/8, 3 Pi/4, 7 Pi/8, Pi,
       9 Pi/8, 5 Pi/4, 11 Pi/8, 3 Pi/2, 13 Pi/8, 7 Pi/4, 15 Pi/8, 
      2 Pi, 17 Pi/8}, {-2, -1, -1/2, 0, 1/2, 1, 2}}
   ];
bb1 = ParallelTable[aa1, {t, 0.1, 17 Pi/8, 0.05}];
Export["grafica_000.gif", bb1]

The code produces the following image, but how do I avoid movement on $Pi/2$

enter image description here

$\endgroup$
4
$\begingroup$

I changed a bit settings of your code so you have more control over the display of animation. The key fix is using Exclusions->None. You can also use 'Exclusions->Automatic'. In future please pay attention to your question titles (you had "A problem with ParallelTable") --- obviously ParallelTable itself got nothing to do with your issue, as it is of graphical nature.

meti={0,Pi/8,Pi/4,3 Pi/8,Pi/2,5 Pi/8,3 Pi/4,7 Pi/8,Pi,9 Pi/8,
5 Pi/4,11 Pi/8,3 Pi/2,13 Pi/8,7 Pi/4,15 Pi/8,2 Pi,17 Pi/8};

aa1[t_]:=
Plot[
    {Tan[x],0},{x,0,t},
    Mesh->{meti},
    MeshStyle->{Directive[PointSize[Medium],Blue]},
    PlotRange->{{0,2 Pi},{-1.5,1.5}},
    Ticks->{meti,{-2,-1,-1/2,0,1/2,1,2}},
    PlotStyle->{Blue,Directive[Red,Thick,Dashed]},
    Exclusions->None,
    ImageSize->500
    ]

bb1 = ParallelTable[aa1[t], {t, 0.1, 17 Pi/8, 0.05}];
Export["grafica_000.gif", bb1, "AnimationRepetitions" -> Infinity]

enter image description here

| improve this answer | |
$\endgroup$

Your Answer

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

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