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: Re: [mg5235] labelling contours
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Daitaro Hagihara

Posts: 43
Registered: 12/7/04
Re: [mg5235] labelling contours
Posted: Nov 18, 1996 2:05 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

The following strip of Mma code, which I wrote eons ago, shows the use of =
LabeledListPlot to "simulate" labeling contours. May not be the best =
example, but it works (for me at least).

Regards,

profit =3D ( 1 - c ) p^p ( ( 1 - p ) / t )^( 1 - p ) ( 1 + t ) ;
<<Graphics`Graphics`
points =3D Table [
{ ( 1 - c ) ( -1 + p + p t ), ( 1 - c ) ( -1 + p + p t ) / t,
StringForm [ "``%", Round [ 100 p ] ] } /.
( FindRoot [ # =3D=3D 1, { t, 2 }, MaxIterations -> 100 ] & @
( profit /. c -> 10 / 100 ) ) /. c -> 10 / 100,
{ p, .5, .9, .05 } ] ;
g1 =3D LabeledListPlot [ points, DisplayFunction -> Identity ] ;
g2 =3D Table [ Graphics [ Line [ Table [ { x, y } /.
( FindRoot [ # =3D=3D 1, { y, .2 }, MaxIterations -> 100 ] & @
( ( 1 - c + x )^p ( 1 - c - y )^( 1 - p ) /. c -> 10 / 100 ) ),
{ x, .2, .8, .001 } ] ] ], { p, .4, .9, .05 } ] ;
Show [ Append [ g2, g1 ], DisplayFunction -> $DisplayFunction,
PlotRange -> { { .2, .8 }, { .2, .6 } }, AspectRatio -> 2 / 3,
Frame -> True, FrameLabel -> { "GAINS", "LOSSES" } ] ;








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.