4
$\begingroup$

I have a curve. If I want to color fill or shade, not towards axis but upward form the curve, what command can I use?

$\endgroup$

1 Answer 1

5
$\begingroup$
Plot[Sin[x], {x, 0, 2 Pi}, Filling -> Top]

enter image description here

Plot[Sin[x], {x, 0, 2 Pi}, Filling -> 0.5]

enter image description here

Plot[Sin[x], {x, 0, 2 Pi},
 Filling -> 0.5,
 FillingStyle ->
  {Directive[Opacity[0.5], Orange],
   Directive[Opacity[0.5], Yellow]},
 GridLines -> {None, {0.5}},
 GridLinesStyle -> Dashed

enter image description here

$\endgroup$

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .