The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Drawing a Line From One Plot to Another
Replies: 5   Last Post: Aug 29, 2012 1:19 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
E. Martin-Serrano

Posts: 114
Registered: 9/5/08
Re: Drawing a Line From One Plot to Another
Posted: Aug 20, 2012 4:16 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

f2[x_]:=2 x
f1[x_]:= x^2
xmin =-3;
xmax= 3;

Module[{isize =300},
xmin =-3;
xmax= 3;

pt11 ={xx, f1[xx]};
pt12 ={xx, plotrange1[[2]][[1]]};

g1 =Show[{Plot[f1[x],{x,xmin,xmax},PlotStyle-> Purple ],
Graphics[{{Red,Dashed, Line[{pt11 ,pt12}]}, Red,PointSize[.02],
Point[pt11], Black, Circle[pt11,Offset[4]]}]}, PlotRange -> plotrange1,
Axes-> True,AxesStyle->{Transparent,LightGray},Ticks->Automatic,Frame->
True,FrameStyle -> {{LightGray, LightGray},{Transparent,
LightGray}},FrameTicks -> False,ImageSize -> isize];

pt21 ={xx, f2[xx]};
pt22 ={xx, plotrange2[[2]][[2]]};

g2=Show[{Plot[f2[x],{x,xmin,xmax},PlotStyle-> Blue ], Graphics[{{Red,Dashed,
Line[{pt21 ,pt22}]}, Red,PointSize[.02], Point[pt21],Black,
Circle[pt21,Offset[4]]}]}, PlotRange -> plotrange2, Axes->
True,FrameStyle -> {{LightGray,
LightGray},{LightGray,{Dashed,LightGray}}},FrameTicks -> False,ImageSize ->


{{xx,.6,"Current 'x' value"},xmin,xmax, ImageSize->Small}]

(* Try the slider and the Manipulate 'Autorun' *)

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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.