Group Abstract Group Abstract

Message Boards Message Boards

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

Bicolor region plot of hyperbola bounded by asymptotes

Posted 25 days ago

enter image description here

How to plot a hyperbola and its asymptotes in Mathematica, with the coloring scheme consistent with the figure above: the regions between the hyperbola and its asymptotes filled with the same color, the interior of the hyperbola filled with the same color, and the regions above and below the asymptotes filled with the same color.

ContourPlot[
 Evaluate@{x^2/3 - y^2/2 == 1, x^2/3 - y^2/2 == 0}, {x, -3, 
  3}, {y, -2, 2}, Frame -> False, Axes -> True]
POSTED BY: Bill Blair
2 Replies

Try using the Contours option instead of multiple equations:

ContourPlot[x^2/3 - y^2/2
 , {x, -3, 3}, {y, -2, 2}
 , Contours -> {0, 1}, ContourShading -> {Yellow, Green, Red}, 
 Frame -> False, Axes -> True, AspectRatio -> 1/GoldenRatio]
POSTED BY: Michael Rogers
Posted 24 days ago

Thank you so much for helping me solve this problem. I also learned a new usage

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