[R] dnorm Line Plot Graphics
Melissa Peters
melissapeters at email.com
Wed Jul 14 00:21:29 CEST 2010
Hello,
1. I have a number of snow depth measurements (centimeters depth) that were acquired in a row (linear transect).
A: I am trying to plot the probability density function (PDF) of these points. When I use the "dnorm" command and line type = points, the PDF is displayed correctly. When I change the line type = line, it displays the PDF curve with numerous lines connecting multiple of the points together rather than just one line connecting the points in sequence. I have noticed in some online help tutorials the use of the "seq" command, but when I employ this it simply flattens my PDF curve to a straight line at 0% probability. Is there something I am missing?
> plot(Snow,dnorm(Snow,mean=26.61,sd=14.179),type="l")
B: The y-axis labels seem quite small to me. For example, I would expect the first tick mark to be "0.05" indicating a 5% frequency, not "0.005." Suggestions?
C. Is there a simple way of changing the y-axis labels to display percent (ex. 5%) rather than decimal (ex. 0.05) without having to manually type in all of the new tick mark labels using the "axis" command?
2. I have meteorological weather station data acquired at 6 different locations that I would like to compare. The data spans two months (time series).
A. Can you please direct me to an online tutorial or help guide that instructs how to place all 6 locations on the same plot for easy comparison?
B. I would also like to "stack" these plots so, for example, there would be three plots stacked vertically with each plot having an individual y-axis, but then a single x-axis (date) along the bottom. Can you please direct me towards instructions that would cover such a plot?
Thank you,
EdmAB
More information about the R-help
mailing list