[R] Plotting contour & filled.contour in one graph
Michael Prager
Mike.Prager at noaa.gov
Sun Feb 12 21:15:17 CET 2006
GG
Yes, gladly. It is an idealized example of the following data
situation: There are two control or "independent variables." They are
represented here as x and y, on the horizontal and vertical axes
respectively. There are two different responses or "dependent"
variables plotted as different types of contours. The filled contours
show response z. The heavy lines show response zz.
Thus such a plot displays two different responses from a two-dimensional
range of conditions. As an example, in fishery biology, x might be the
age at which fish are first subject to capture, y might be the fishing
mortality rate (intensity) applied, z might be the resulting yield per
fish, and zz might be the resulting spawning per fish. There is usually
a trade-off between yield and spawning potential, and such a graph (if
done with real data) allows one to look at that trade-off.
The OP seemed to be seeking a way of contouring two responses against
two independent variables, and that's what this graph does.
Is that clearer? Would the graph would be better if I used real data?
MHP
Gabor Grothendieck wrote on 2/12/2006 11:31 AM:
> Could you walk us through, in detail, what that graph is showing?
>
>
> On 2/12/06, Michael Prager <Mike.Prager at noaa.gov> wrote:
>
>> Besides the answers you already have, you might look at my "4D" graph
>> example (with code) on the R Graphics Gallery:
>>
>> http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=90
>>
>> I think it does exactly what you are asking, and therefore it might fit
>> your needs with only slight code modification.
>>
>> Mike Prager
>>
>>
>> Abd Rahman Kassim wrote on 2/12/2006 11:12 PM:
>>
>>> Dear All,
>>>
>>> I have a question on overlaying a filled.contour (e.g. on soil properties data) and contour (by elevation) in one graph. Both have the same z matrix dimension. I'm able to overlay both graph, but the plots dimension did not overlap well on the same plots. How can I have both filled.contour and contour on the same graph? The commands that I have written are as follows:
>>>
>>> filled.contour(0:15,0:10,t(matrix(Total.C,nrow=11,ncol=16)))
>>> contour(0:15,0:10,as.matrix(elev),add=T)
>>>
>>> Thanks for anay assistance.
>>>
>>> Regards.
>>>
>>>
>>> Abd Rahman Kassim
>>> Forest Research Institute Malaysia
>>> Kepong 52109
>>> Selangor, MALAYSIA
>>>
>>> *****************************************
>>>
>>>
>>> *****************************************
>>> [[alternative HTML version deleted]]
>>>
>>> ______________________________________________
>>> R-help at stat.math.ethz.ch mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>>>
>>>
>> --
>> Michael H. Prager, Ph.D.
>> Population Dynamics Team
>> NOAA Center for Coastal Habitat and Fisheries Research
>> NMFS Southeast Fisheries Science Center
>> Beaufort, North Carolina 28516 USA
>> http://shrimp.ccfhrb.noaa.gov/~mprager/
>>
>> ______________________________________________
>> R-help at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>>
>>
--
Michael H. Prager, Ph.D.
Population Dynamics Team
NOAA Center for Coastal Habitat and Fisheries Research
NMFS Southeast Fisheries Science Center
Beaufort, North Carolina 28516 USA
http://shrimp.ccfhrb.noaa.gov/~mprager/
More information about the R-help
mailing list