Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #8240
| From | carlos@colorado.edu |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Trying to close some loose plotting |
| Date | 2012-01-30 10:08 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jg5q7i$h4d$1@smc.vnet.net> (permalink) |
Hi - I am trying to plot the real roots of a cubic equation as
functions of one parameter called rc, using the code below, on Mathematica 5.2.
The plotted curves, however, show some dead spots that should not be
there.
How can I get them to fill up? I tried getting rid of the imaginary part when its absolute value is less that a given tolerance, but that trick does not
work.
Thanks for any suggestions.
ClearAll[\[Mu],\[Lambda],\[Beta],a,b,rc];
\[Lambda]1=(2*\[Mu]-(2*2^(1/3)*(-3+2*\[Mu]^2))/(27*rc-18*\[Mu]+20*\
[Mu]^3+
Sqrt[4*(-3+2*\[Mu]^2)^3+(27*rc-18*\[Mu]+20*\
[Mu]^3)^2])^(1/3)+2^(2/3)*
(27*rc-18*\[Mu]+20*\[Mu]^3+Sqrt[4*(-3+2*\[Mu]^2)^3+(27*rc-18*\[Mu]
+20*\[Mu]^3)^2])^(1/3))/6;
\[Lambda]2=(4*\[Mu]+(2*2^(1/3)*(1+I*Sqrt[3])*(-3+2*\[Mu]^2))/(27*rc-18*
\[Mu]+20*\[Mu]^3+
Sqrt[4*(-3+2*\[Mu]^2)^3+(27*rc-18*\[Mu]+20*\[Mu]^3)^2])^(1/3)+
I*2^(2/3)*(I+Sqrt[3])*(27*rc-18*\[Mu]+20*\[Mu]^3+Sqrt[4*(-3+2*\
[Mu]^2)^3+
(27*rc-18*\[Mu]+20*\[Mu]^3)^2])^(1/3))/12;
\[Lambda]3=(4*\[Mu]+(2*2^(1/3)*(1-I*Sqrt[3])*(-3+2*\[Mu]^2))/(27*rc-18*
\[Mu]+20*\[Mu]^3+
Sqrt[4*(-3+2*\[Mu]^2)^3+(27*rc-18*\[Mu]+20*\[Mu]^3)^2])^(1/3)-
2^(2/3)*(1+I*Sqrt[3])*(27*rc-18*\[Mu]+20*\[Mu]^3+Sqrt[4*(-3+2*\
[Mu]^2)^3+
(27*rc-18*\[Mu]+20*\[Mu]^3)^2])^(1/3))/12;
thick=AbsoluteThickness[1.25];
p1style={{thick,RGBColor[0,0,0]},
{thick,RGBColor[1,0,0]}, {thick,RGBColor[0,1,0]},
{thick,RGBColor[0,0,1]}, {thick,RGBColor[1,1/2,0]},
{thick,RGBColor[1/2,0,1]},{thick,RGBColor[1,0,1]},
{thick,RGBColor[1,0,1/2]},{thick,RGBColor[1,0,0]},
{thick,RGBColor[0,1,0]}, {thick,RGBColor[0,0,1]},
{thick,RGBColor[1,1/2,0]},{thick,RGBColor[1/2,0,1]},
{thick,RGBColor[1,0,1]}, {thick,RGBColor[1,0,1/2]}};
rctab={0, 0.04, 0.08, 0.15, 0.3, 0.5, 1, 2,
-0.04,-0.08,-0.15,-0.3,-0.5,-1,-2};
Np=Length[rctab];
\[Lambda]1tab=Table[\[Lambda]1/.rc->rctab[[i]],{i,1,Np}];
\[Lambda]2tab=Table[\[Lambda]2/.rc->rctab[[i]],{i,1,Np}];
\[Lambda]3tab=Table[\[Lambda]3/.rc->rctab[[i]],{i,1,Np}];
\[Lambda]123=Flatten[{\[Lambda]1tab,\[Lambda]2tab,\[Lambda]3tab}];
Off[Plot::"plnr"];
Plot[Evaluate[\[Lambda]123],{\[Mu],-1,1},PlotStyle->p1style,
PlotRange->{-1.5,1.5},AspectRatio->1.5,Frame->True,
ImageSize->300,DisplayFunction->$DisplayFunction]
Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread
Trying to close some loose plotting carlos@colorado.edu - 2012-01-30 10:08 +0000 Re: Trying to close some loose plotting Chris Young <cy56@comcast.net> - 2012-02-01 08:52 +0000 Re: Trying to close some loose plotting Chris Young <cy56@comcast.net> - 2012-02-01 08:55 +0000
csiph-web