Dear All, I'm trying to plot a histogram (with the relative frequencies as the Y axis), But the scale of the y axis is given by 0e+00, 1e-04, 2e-04, 3e-04,......... Now, I have 2 questions 1- Does (1e-04=0.01831563)? 2- If this true,how can i change the given scale to (0.01,0.03,0.05,0.07,0.09)? [[alternative HTML version deleted]]
Without a short reproducible example your question is difficult to understand, and difficult to give a useful answer. See comments below. -Don At 7:13 AM -0700 8/12/09, maram salem wrote:>Dear All, >I'm trying to plot a histogram (with the relative frequencies as the >Y axis), But the scale of the y axis is given by >0e+00, 1e-04, 2e-04, 3e-04,......... > >Now, I have 2 questions >1- Does (1e-04=0.01831563)?No, 1e-4 does not equal 0.01831563. 1e-4 = 0.0001>2- If this true,how can i change the given scale to >(0.01,0.03,0.05,0.07,0.09)?Since it's not true I suppose you don't need to change the scale? If the relative frequency of some bin is 0.0001, why would you want to label it 0.01? That would be incorrect. I find it somewhat difficult to produce a histogram, using hist(), with a relative frequency scale, and with relative frequencies on the order of 10 to the minus 4. This is another reason why a reproducible example is necessary. -- -------------------------------------- Don MacQueen Environmental Protection Department Lawrence Livermore National Laboratory Livermore, CA, USA 925-423-1062
maram salem wrote:> Dear All, > I'm trying to plot a histogram (with the relative frequencies as the Y axis), But the scale of the y axis is given by > 0e+00, 1e-04, 2e-04, 3e-04,......... > Now, I have 2 questions > 1- Does (1e-04=0.01831563)? > 2- If this true,how can i change the given scale to (0.01,0.03,0.05,0.07,0.09)? > > >Hi Maram, No, you are mistaking scientific notation for exponentiation. Try using: options(scipen=4) before you plot. Jim
> > > 2- If this true,how can i change the given scale to > (0.01,0.03,0.05,0.07,0.09)?If you want to change the axis tickmarks you can buildt your plot with yaxt="n" and then add an axis with what you want, e.g. axis(side=2,at=c(0.01,0.03,0.05,0.07,0.09),cex.axis=1,las=2) Hope this helps. If not pls. include a reproducable example.> > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
Possibly Parallel Threads
- The code itself disappears after starting to execute the for loop
- The code itself disappears after starting to execute the for loop
- Strange behavior when using progress bar (Fwd: Re: [R] The code itself disappears after starting to execute the for loop)
- axis label
- solving a linear equation