# How do I switch between dashed and undashed styles in ParametricPlot?

I am trying to generate a parametric plot in Mathematica 8 using the following:

pp1=ParametricPlot[{Evaluate[Qin[t]]*10^3,Evaluate[PhiOut[t]]},{t,0,1/f0},AspectRatio->1/1,PlotRange->All,AxesOrigin->{0,0},PlotStyle->Directive[Thickness[Medium],colour]];


This works fine but I was wondering if it is possible to switch the styling of the line from solid to dashed for a certain range of the plotting parameter t e.g. for t>0.5*1/f0. I know that this can be done by generating separate plots and then combining them. This is not very convenient in my case. Is it possible to do this in a single ParametricPlot command?

-

## migrated from stackoverflow.comNov 10 '12 at 21:09

This question came from our site for professional and enthusiast programmers.

 ParametricPlot[{ Cos[t], Sin[t]}, {t, 0, 2 Pi},
PlotStyle -> Directive[Thick, Black],
Mesh -> {Range[0, 2 Pi, Pi]},


-
Thank you. This is what I was looking for. –  Zots Nov 12 '12 at 1:02

Use PlotStyle. Here's an example:

ParametricPlot[{{2 Cos[t], 2 Sin[t]}, {2 Cos[t], Sin[t]}, {Cos[t], 2 Sin[t]}, {Cos[t],    Sin[t]}}, {t, 0, 2 Pi},
PlotStyle -> {Dashed, Directive[Dashed, Orange],  Directive[Thick, Green],Black}]


-
Hi and thanks for your reply. This is not exactly what I am trying to do. Here is a simple example to demonstrate my question: What I am trying to do is the equivalent of this sequence of 3 commands: pp1=ParametricPlot[{Cos[t],Sin[t]},{t,0, Pi},PlotStyle->{Black}]; pp2=ParametricPlot[{Cos[t],Sin[t]},{t,Pi,2 Pi},PlotStyle->{Black,Dashed}]; Show[pp1,pp2,PlotRange->All] but in a single ParametricPlot. –  Zots Nov 9 '12 at 18:44
I misunderstood the aim of your question. Unfortunately, I do not know how to solve this without using more than one ParametricPlot. –  David Carraher Nov 9 '12 at 18:53