2

I am trying filling between of lines: $ y = x^3$, $y=0$, $x=-1$, and $x=1$. I tried.

Plot[{x^3, 0}, {x, -1, 1}, PlotRange -> {-2, 2}, 
 PlotStyle -> {Automatic, Red}, 
 Filling -> {1 -> {{2}, {LightBlue, White}}}, PlotPoints -> 100]

and got enter image description here

How can I get fill graph with x from 0 to 1?

minhthien_2016
  • 3,347
  • 14
  • 22

1 Answers1

3
Plot[x^3, {x, -1, 1},
  Filling -> {1 -> 0}, 
  PlotStyle -> None, 
  FillingStyle -> LightBlue]

enter image description here

Szabolcs
  • 234,956
  • 30
  • 623
  • 1,263