Message Boards Message Boards

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

Fill Plot above a horizontal line

Posted 10 years ago
Hi,
I wanna shade the plot wheh the fx >0
Following is the code I have. But it shades around 0.3 regardless Y>0.3 or Y<0.3
How to customize the code only to have the fill area between the ploy where y>0.3
Plot[Sin[t]^2, {t, 0, 2 Pi}, Filling -> 0.3]
POSTED BY: Rashmil D
2 Replies
Posted 10 years ago
Thank you. It works well 
POSTED BY: Rashmil D
Posted 10 years ago
Hi Rashmil,

You can set a separate filling above and below the target value.

Plot[Sin[t]^2, {t, 0, 2 Pi},
Filling -> {1 -> {0.3, {None, Lighter[Blue, .85]}}}]
POSTED BY: Michael Hale
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