Message Boards Message Boards

0
|
3020 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Manipulation Graphics

Posted 11 years ago

Hello,

I built a manipulation, but I can't figure out how to add graphics. Here's what I have so far:

Manipulate[Plot[((a/(1 - b)) + (b/(1 - b))*c), {c, 0, 100}, 
PlotRange -> {{0, 100}, {0, 300}}, AxesOrigin -> {0, 0}, 
AxesLabel -> {Xaxis, Yaxis}], {{a, 30}, 0, 50}, {{b, .6}, 0, 1}, {{c, 90}, 0, 100}]

How can I add dynamic dashed lines? For example, this demonstration has dashed lines from each axis to the curve(s): http://www.demonstrations.wolfram.com/BasicSupplyAndDemand/ ... How do I add similar dashed lines to my manipulation?

The demonstration in the link above also has dynamic labels (P^e and Q^e). How do I add similar labels?

Thanks for your time. I appreciate your help.

Attachments:
POSTED BY: Edo Nomics
2 Replies

Dear Edo,

the Demonstration project comes with the full code, so that you can see how it is done. You only need to adapt it to your problem and you get something like:

Manipulate[
 Plot[((a/(1 - b)) + (b/(1 - b))*c), {c, 0, 100}, 
  PlotRange -> {{0, 100}, {0, 300}}, AxesOrigin -> {0, 0}, 
  LabelStyle -> Directive[Bold, 14], AxesLabel -> {"Xaxis", "Yaxis"}, 
  Ticks -> {{{c/2, "Q"}}, {{
      ((a/(1 - b)) + (b/(1 - b))*c/2), "P"}}}, 
  Epilog -> {{Thick, Dashed, 
     Line[{{c/2, 
        0}, {c/2, ((a/(1 - b)) + (b/(1 - b))*c/2)}}]}, {Thick, Dashed,
      Line[{{c/
         2, ((a/(1 - b)) + (b/(1 - b))*
           c/2)}, {0, ((a/(1 - b)) + (b/(1 - b))*c/2)}}]}}], {{a, 30},
   0, 50}, {{b, .6}, .0000001, 1}, {{c, 90}, 0, 100}]

which I hope does what you want.

Cheers,

Marco

POSTED BY: Marco Thiel
Posted 11 years ago

Perfect! Thanks so much Marco, that was really nice of you.

POSTED BY: Edo Nomics
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract