Displaying 20 results from an estimated 10000 matches similar to: "How to change the scale of the Y axis?"
2011 Apr 29
4
plot several histograms with same y-axes scaling using hist()
Dear all
Problem: hist()-function, scale = ?percent?
I want to generate histograms for changing underlying data. In order to make
them comparable, I want to fix the y-axis (vertical-axis) to, e.g., 0%, 10%,
20%, 30% as well as to fix the spaces, too. So the y-axis in each histogram
should be identical. Currently, I have 100 histograms and the y-axis scales
changes in each.
Here is my code:
2005 Nov 15
2
y-axis in histograms
Dear R- list,
I have some data to present with histograms. Therefore I used hist(...).
I have few values with almost 80% of
the frequencies (totaly 800) and some other values with low frequencies
( totaly 5 -10 )
that I want to emphasize. Therefore I want to "cut" the y-axis on 100,
but I
don't know how to deal with this.
Thanks in advance,
Michael Graber
2010 May 31
4
Y-axis range in histograms
Hi,
I'm trying to create a histogram with R. The problem is that the frequency
is high for a couple of x-axis categories (e.g. 1500) and low for most of
the x-axis categories (e.g. 50)
http://r.789695.n4.nabble.com/file/n2237476/LK3_hist.jpg . When I create the
histogram, it is not very informative, because only the high frequencies can
be seen clearly. Is there any way I could cut the
2007 Mar 08
2
Using logarithmic y-axis (density) in a histogram
Hi,
I am searching for a possibility to display a logarithimic y-axis in a histogram. With plot that's easy (e.g.
plot(1:10, log="y")
but for histograms this does not work the same way: I tried
hist(rnorm(1000), freq=FALSE, seq(-4, 4, .5), ylim=c(0.001, 0.5), log="y")
Which gives the expected histogram but also warnings for my log="y" command
2009 Jul 20
3
Histograms on a log scale
Dear All,
I would like to be able to plot histograms/densities on a semi-log or
log-log scale.
I found several suggestions online
http://tolstoy.newcastle.edu.au/R/help/05/09/12044.html
https://stat.ethz.ch/pipermail/r-help/2002-June/022295.html
http://www.harding.edu/fmccown/R/#histograms
Now, consider the code snippet taken from
http://www.harding.edu/fmccown/R/#histograms
# Get a random
2009 Jun 08
2
Re flect Back to Back Histograms in x-axis?
I've looked long and hard for this, but maybe I am missing something...
There is a nice module that displays histograms reflected in the y axis,
i.e. http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=136
but is it possible to reflect in the x-axis, so to have two datasets, one
pointing up and one down rather than left and right? I haven't been able to
find a way to plot this
2010 Aug 30
3
log y 'axis' of histogram
All,
I have been trying to get calls to hist(...) to be plotted
with the y-axis having a log scale.
I have tried: par(ylog=TRUE)
I have also looked at the histogram package.
Suggestions welcome.
--
Derek M. Jones tel: +44 (0) 1252 520 667
Knowledge Software Ltd mailto:derek at knosof.co.uk
Source code analysis http://www.knosof.co.uk
2012 May 20
2
Histograms with bin proportions on the y-axis
I have what is probably a simple problem. I have a data file from an MCMC
Bayes estimation problem that is a vector of 500,000 numeric values (just
one variable) ranging from 100,000 to 700,000. I need to display the
histogram of this data in a high quality graphic for a figure in a journal
publication. I want 100 bins so as to display a reasonable complete and
smooth histogram, and I need the
2006 Nov 30
1
scaling y-axis to relative frequency in multiple histogram (multhist)
Hi,
I'm plotting a multiple histogram using the function multhist {package
plotrix}, something like:
library(plotrix)
mh <- list(rnorm(200, mean=200, sd=50), rnorm(200, mean=250, sd=50))
multhist(mh)
In this graph y-axis represents the frequency of observations.... but I
would like it to be scaled into relative frequencies,
does anybody know how to do this with multhist or similar
2002 Dec 12
3
y axis on hist
Hi:
The y axis on the hist function seems to set its limits oddly.
sometimes, it covers the full range of the data and sometimes it stops
one major tick short. I have had this behavior with a variety of data
sets, and it can easily be reproduced by just running the following
several times:
hist(rnorm(100000))
I have tried explicitly setting ylim to the range of values produced by
rnorm
2011 Jun 09
1
histogram - density on y axis and restriction to interval [0, 1]
Hello,
To indicate probability densities instead of counts on a histogram, I
specify freq = FALSE.
However, I expect that summing all top y coordinates over all the
intervals of the histogram will provide 1.
1)
v <- c(0.2885, 0.2988, 0.3139, 0.2615, 0.3179, 0.3163, 0.2583, 0.3052,
0.2527, 0.3147, 0.3235, 0.2408, 0.2480, 0.3108, 0.3577, 0.2829, 0.2694,
0.3275, 0.3314, 0.2639, 0.3076,
2012 Jun 26
3
plotting two histograms on one plot with hist function
I would like to plot two data sets (frequency (y-axis) of mean values for 0-1(x=axis)) on a single histogram for comparison. The hist() only allow the overlay of two histograms, and although barplot() allows beside=TRUE, it does not show frequency values (like hist) but rather all of the values. Is there any way that I can use the hist() to plot two data sets similar to the barplot(). Any help or
2023 Aug 06
2
hist(..., log="y")
Sorry if this topic has been discussed earlier.
Currently, hist(..., log="y") fails with
> hist(rexp(1000, 1), log="y")
Warning messages:
1: In plot.window(xlim, ylim, "", ...) :
nonfinite axis=2 limits [GScale(-inf,2.59218,..); log=TRUE] -- corrected
now
2: In title(main = main, sub = sub, xlab = xlab, ylab = ylab, ...) :
"log" is not a graphical
2023 Aug 06
1
hist(..., log="y")
hist() is designed so that the total area sums to 1. You should build you desired behavior using a barchart.
?
David
Sent from my iPhone
> On Aug 5, 2023, at 11:50 PM, Ott Toomet <otoomet at gmail.com> wrote:
>
> ?Sorry if this topic has been discussed earlier.
>
> Currently, hist(..., log="y") fails with
>
>> hist(rexp(1000, 1), log="y")
2011 Mar 03
1
Ploting Histogram with Y axis is percentage of sample for each bin
I'm trying to do something very simple...
I wan to plot a histogram where the y axis represent the percentage of the
total sample that each bin represents.
I know how to plot a histogram with the counts and density... but can't find
anything that gives me perenct of sample on the y axis.
Any help is appriciated
Below is the script I'm working with
par(mfrow=c(1,2))
2007 Apr 16
2
Histograms of lots of variables
Hi R-helpers,
I wish to produce frequency histograms of all of the variables in my
dataframe (except some identifying variables).
I have tried
>hist(dataframe[,3:20])
to produce histograms of the 3rd through 20th variables in my dataframe, but
R doesn't like that.
Could anyone provide a suggestion?
Also, once I produce the histograms, I'd like to save them as graphic files
on my
2011 Feb 19
3
Kolmogorov-smirnov test
Is the kolmogorov-smirnov test valid on both continuous and discrete data?
I don't think so, and the example below helped me understand why.
A suggestion on testing the discrete data would be appreciated.
Thanks,
a <- rnorm(1000, 10, 1);a # normal distribution a
b <- rnorm(1000, 12, 1.5);b # normal distribution b
c <- rnorm(1000, 8, 1);c # normal distribution c
d <- rnorm(1000,
2004 May 13
2
tapply & hist
I'm learning how to use tapply.
Now I'm having a go at the following code in which dati contains almost 600
lines, Pot - numeric - are the capacities of power plants and SGruppo - text
- the corresponding six technologies ("CCC", "CIC","TGC", "CSC","CPC", "TE").
.....................................................
2000 Mar 10
1
variable name to hist within apply?
Hello,
After spending sometime trying to generate histograms of all the
numeric variables in a data frame using a for loop, I realized I could
use apply to create the histograms. This was one of those few moments
when I `see' the alternative to looping.
So, I can generate all the histograms with this command:
apply(toblo.df[,-c(40,52)],2,hist) # 40 and 52 are ID's
When I do this, the
2010 Jul 09
3
how to plot two histograms overlapped in the same plane coordinate
Dear R-help listers,
I am new. I just want to get helps on how to plot two histograms
overlapped in the same plane coordinate. What I did is very ugly.
Could you please help me to improve it? I want to got a plot with semi-
transparent overlapping region. And, I want to know how to specify the
filled colors of the different histograms.
I also prefer other solutions other than ggplot2.
Many