Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Topic: Labelling each curve and changing grid in ParametricPlot
Replies: 3   Last Post: Feb 3, 2013 8:19 PM

 Messages: [ Previous | Next ]
 Bob Hanlon Posts: 906 Registered: 10/29/11
Re: Labelling each curve and changing grid in ParametricPlot
Posted: Feb 3, 2013 2:51 AM

plot[tau_, omega_] :=
Module[{arg, abs},
{arg, abs} =
Factor[
Together[
ComplexExpand[
Through[{Arg, Abs}[(1 + I*2*omega)/
(1 + I*2*tau*omega)]]]]];
{arg/Degree, 20*Log10[abs]}]

Show[
ParametricPlot[
Evaluate[
Table[
plot[tau, omega],
{omega, -0.5, -0.1, 0.05}]],
{tau, 7, 15},
PlotStyle ->
Directive[
Gray,
AbsoluteDashing[{5, 5}]]],
ParametricPlot[
Evaluate[
Table[
plot[tau, omega],
{tau, Range[7, 15]}]],
{omega, -0.5, -0.01},
AspectRatio -> 1],
Frame -> True,
Axes -> False,
PlotRange -> All,
AspectRatio -> 1,
Epilog -> {
Table[
Text[tau, plot[tau, -0.5], {2, 0}],
{tau, 8, 14, 2}],
Table[
Text[omega, plot[7, omega], {1.25, -1}],
{omega, -0.45, -0.15, 0.1}]}]

Bob Hanlon

On Sat, Feb 2, 2013 at 11:17 AM, Eduardo M. A. M. Mendes
<emammendes@gmail.com> wrote:
> Dear Bob
>
> Many thanks. As usual I will have to spend time to understand your code. I am too much of beginner.
>
> As for the grid, I was thinking of removing the standard grid all together and draw (just the dashed grid lines) lines for specific values of Omega.
>
> Regards
>
> Ed
>
>
> On Feb 2, 2013, at 12:06 PM, Bob Hanlon <hanlonr357@gmail.com> wrote:
>

>> plot[tau_, omega_] :=
>> Module[{arg, abs},
>> {arg, abs} =
>> Factor[
>> Together[
>> ComplexExpand[
>> Through[{Arg, Abs}[
>> (1 + I*2*omega)/(1 + I*2*tau*omega)]]]]];
>> {arg/Degree, 20*Log10[abs]}]
>>
>> ParametricPlot[
>> Evaluate[
>> Table[
>> plot[tau, omega],
>> {tau, Range[7, 15]}]],
>> {omega, -0.5, -0.01},
>> AspectRatio -> 1,
>> GridLines -> Automatic,
>> GridLinesStyle -> Dashed,
>> ImageSize -> Large,
>> Epilog -> {
>> Table[
>> Text[tau, plot[tau, -0.5], {2, 0}],
>> {tau, 7, 15}]},
>> Mesh -> 5]
>>
>>
>> Bob Hanlon
>>
>>
>> On Sat, Feb 2, 2013 at 1:18 AM, Eduardo M. A. M. Mendes
>> <emammendes@gmail.com> wrote:

>>> Hello
>>>
>>> I wonder whether someone out there could help me with the following problem.
>>>
>>> plot[\[Tau]_, \[CapitalOmega]_] := Module[{arg, abs},
>>> {arg, abs} = Factor[Together[ComplexExpand[
>>> Through[{Arg, Abs}[(1 + I*2*\[CapitalOmega])/(1 + I*2*\[Tau]*\[CapitalOmega])]]]]];
>>> {arg/Degree, 20*Log10[abs]}]
>>>
>>> ParametricPlot[Table[plot[\[Tau], \[CapitalOmega]], {\[Tau], {7, 8, 9, 10, 11, 12, 13, 14, 15}}],
>>> {\[CapitalOmega], -0.5, -0.01}, AspectRatio -> 1, GridLines -> Automatic,
>>> GridLinesStyle -> Dashed, ImageSize -> Large]
>>>
>>> I need to label each curve with the value of tau and, instead of the normal grid, a grid based on the values of Omega.
>>>
>>> I saw something related to the label problem on the net but could not figure out how to change it to my case. Something with Epilog.
>>>
>>> Many thanks
>>>
>>> Ed
>>>
>>>
>>>

>

Date Subject Author
2/3/13 Bob Hanlon
2/3/13 emammendes@gmail.com