Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Region filling clipped with RegionFunction' topicStudent Support Forum > General > Archives > "Region filling clipped with RegionFunction"

Next Comment >Help | Reply To Topic
Author Comment/Response
John
09/23/10 07:38am

Hello all,

I am trying to create a simple plot in which the region between two lines is filled, only where x and y > 0:

Plot[{20 - x, 30 - x}, {x, 0, 30}, Filling -> {2 -> {1}},
RegionFunction -> Function[{x, y}, y > 0]]

The plot displays correctly except that the shading cuts off at x=20, leaving the region 20<x<30 unfilled. I have attached an image of the plot to illustrate what's happening.

I've tried several constraints on RegionFunction to get the rest of the region filled, but I have been unsuccessful.

Can someone please help me with this?

Thank you

Attachment: clipregion.jpg, URL: ,

Subject (listing for 'Region filling clipped with RegionFunction')
Author Date Posted
Region filling clipped with RegionFunction John 09/23/10 07:38am
Re: Region filling clipped with RegionFunction Bill 09/23/10 9:42pm
Re: Re: Region filling clipped with RegionFunct... John 09/28/10 10:34pm
Re: Region filling clipped with RegionFunction Bill 09/30/10 12:55pm
Next Comment >Help | Reply To Topic