Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   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
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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
>>>
>>>
>>>

>




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.