Reputation: 6619
How could I create the following using Rectangle[]
in Graphics[]
?
Upvotes: 6
Views: 2646
Reputation: 61046
Also:
Graphics[Raster[{Range[100]/100}, ColorFunction -> (Blend[{White, Red}, #] &)],
AspectRatio -> .3,
Frame -> True,
FrameTicks -> None]
Upvotes: 5
Reputation: 25703
Using Polygon
, you can
Graphics[{EdgeForm[Black],
Polygon[{{0, 0}, {3, 0}, {3, 1}, {0, 1}},
VertexColors -> {White, Red, Red, White}]}]
Upvotes: 7