Tagged Questions
5
votes
2answers
54 views
How can I get the same plot without the intermediate step of the amount aggregation?
How can I get the same plot without the intermediate compute of the aggregate column.
I have this data :
set.seed(1234)
dat <- data.frame(month = gl(3,1,20),
family= gl(5,1,20),
...
1
vote
1answer
72 views
Two data series overlayed on the same bar chart/histogram
I'm using ggplot2 and I need to display two sets of data on the same histogram and need to distinguish between them. At the moment, I'm just setting the colour of each series to be 50% opacity so that ...
28
votes
3answers
3k views
Scatterplot with marginal histograms in ggplot2
Is there a way of creating scatterplots with marginal histograms just like in the sample below in ggplot2? In Matlab it is the scatterhist() function and there exist equivalents for R as well. ...
0
votes
1answer
48 views
How do I change the position of bins in ggplot2 for R
The following plots a histogram with a bin whose left most point is at 0.
myplot = ggplot(df,aes(x = myvar)) +
geom_histogram(aes(y = ..density..), binwidth = .3)
I want the histogram ...
4
votes
3answers
245 views
Stacked histogram from already summarized counts using ggplot2
I would like some help coloring a ggplot2 histogram generated from already-summarized count data.
The data are something like counts of # males and # females living in a number of different areas. ...
1
vote
0answers
364 views
Overlay density and histogram plot with ggplot2 using custom bins
So I have some data - gene expression in several samples - that I want to plot as an histogram binned in a way that makes sense, and then overlaying a density curve. Something along the lines of this ...
1
vote
2answers
97 views
How to force a y axis to minimum and maximum range in R?
If you look at the graph below (y axis), you will notice that the scale is from 0 to 0.20. I have other histograms where the range is from 0 to 0.4. I want to make all of them consistent from 0 to 1 ...
0
votes
1answer
114 views
Why X-axis values of a histogram disappear when specifying the breaks?
trying to plot a raster file using ggplot2 but the x axis values disappeared. I am grateful to any help
conne <- file("C:complete.bin","rb")
sd <- readBin(conne, numeric(), size=4, ...
1
vote
2answers
162 views
how to plot a raster file as a histogram using ggplot2?
I have a raster file
and I want to plot as a histogram ,i did it using hist() as shown below. but i would like to plot using ggplot2 which plot it in a better way for publication.
conne <- ...
0
votes
2answers
202 views
Use ddply() to aggregate relative histogram counts
Related to a previous question I asked (ggplot2 how to get 2 histograms with the y value = to count of one / sum of the count of both), I tried to write a function which would take a data.frame as ...
3
votes
1answer
642 views
SuperImpose Histogram fits in one plot ggplot
I have ~ 5 very large vectors (~ 108 MM entries) so any plot/stuff I do with them in R takes quite long time.
I am trying to visualize their distribution (histogram), and was wondering what would be ...
1
vote
2answers
309 views
Histogram with “negative” logarithmic scale in R
I have a dataset with some outliers, such as the following
x <- rnorm(1000,0,20)
x <- c(x, 500, -500)
If we plot this on a linear x axis scale at this we see
histogram(x)
I worked out a ...
0
votes
2answers
219 views
ggplot2 how to get 2 histograms with the y value = to count of one / sum of the count of both
I guess my question is simple (even if the title is not...) but I was not able to find any clear answer yet. I want to plot histograms of Reaction Times in a psychophysics task. I need to plot two of ...
1
vote
1answer
367 views
R - Histogram / density plot of data in data frame
I'm sure there is an obvious and easy solution for this ... but I'm drawing a complete blank on this one: how can I create a histogram and/or density plot using ALL data points in a data set that ...
1
vote
1answer
101 views
ggplot() lines transparency
How to change the transparency level of lines in ggplot() diagram (i.e. histogram, line plot, etc.)?
For instance consider the code below:
data <- data.frame(a=rnorm(100), b = rnorm(100,.5,1.2))
...