Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Using a table of values to restrict a contour p...' topicStudent Support Forum > General > "Using a table of values to restrict a contour p..."

Next Comment >Help | Reply To Topic
Author Comment/Response
Michael
12/14/11 01:16am

I have been banging my head against this problem for days, and I am officially surrendering.

I have a table of data that I am using to create a ListContourPlot. I have another table that I want to use to restrict the plot area. I have no problems doing this with normal plots, such as

ContourPlot[Cos[x] + Cos[y], {x, 0, 4 Pi}, {y, 0, 4 Pi},
RegionFunction -> (Sin[#1] + Sin[#2] > 1 &)]

But, if I instead turn the functions into discrete values, it fails to change the plot region

f1 = Flatten[
Table[{x, y, Cos[x] + Cos[y]}, {x, 0, 4 Pi, 0.5}, {y, 0, 4 Pi,
0.5}], 1];
f2 = Flatten[
Table[{x, y, Sin[x] + Sin[y]}, {x, 0, 4 Pi, 0.5}, {y, 0, 4 Pi,
0.5}], 1];
ListContourPlot[f1, RegionFunction -> f2 > 1]

Any assistance would be greatly appreciated.


URL: ,

Subject (listing for 'Using a table of values to restrict a contour p...')
Author Date Posted
Using a table of values to restrict a contour p... Michael 12/14/11 01:16am
Re: Using a table of values to restrict a conto... Peter Pein 12/15/11 3:52pm
Re: Re: Using a table of values to restrict a c... Michael 12/17/11 2:23pm
Next Comment >Help | Reply To Topic