Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'regionplot with multiple colorfunctions' topicStudent Support Forum > General > "regionplot with multiple colorfunctions"

Next Comment >Help | Reply To Topic
Author Comment/Response
Nick
09/08/11 11:35pm

I'm not sure if this is the write place to post this, but I haven't been able to find any documentation on this. What I'm trying to do is get RegionPlot to plot multiple regions and assign each a different ColorFunction that I specify based on a different function's value. For example,

RegionPlot[{(x+1)^2 + y^2 < 4, (x-1)^2 + y^2 < 4}, {x,-4,4}, {y,-4,4}, PlotPoints -> 100]

will plot the two disks on the same axes and assign them different colors, where the overlap is a blending of the two. However, if I try to do something like

RegionPlot[{(x+1)^2 + y^2 < 4, (x-1)^2 + y^2 < 4}, {x,-4,4}, {y,-4,4}, ColorFunction -> {colorfunction1,colorfunction2}, PlotPoints -> 100]

colorfunction1 and colorfunction2 are used to color both of the circles so there is a blending of the two color schemes on the union of the disks.

Is there a way to enter multiple color functions so that the first is used to color the first region, the second to color the second region, and so on; and so that the overlap is simply colored by the function associated to the last listed region? (In the above example, colorfunction1 would color (x+1)^2 + y^2 < 4 while colorfunction2 would color (x-1)^2 + y^2 < 4, with colorfunction2 completely coloring over the intersection of the two disks so that colorfunction1 ends up having no contribution on the intersection.)

URL: ,

Subject (listing for 'regionplot with multiple colorfunctions')
Author Date Posted
regionplot with multiple colorfunctions Nick 09/08/11 11:35pm
Re: regionplot with multiple colorfunctions Nick 09/09/11 7:37pm
Re: regionplot with multiple colorfunctions Bill 09/10/11 12:09pm
Re: Re: regionplot with multiple colorfunctions Nick 09/14/11 12:43pm
Next Comment >Help | Reply To Topic