Skip to main content
Filter by
Sorted by
Tagged with
3 votes
2 answers
170 views

I am very new to coding and R but I am trying to make a series of superimposed histograms with density curves in ggplot2. I have trawled through the forum for similar threads but because I am so new, ...
user31286066's user avatar
1 vote
1 answer
59 views

I created this plot using tensor smooths.. I would like to add a visualization of the data density along the x-axis and z-axis. Ideally, this could be done with either: A rug plot on the respective ...
Fabian.m's user avatar
0 votes
1 answer
84 views

I have a geopandas dataframe that contains points at arbitrary lat/lon points. I would like to create a raster dataset so that each point in the regular grid contains the number of elements of the ...
Alessandro Annunziato's user avatar
0 votes
1 answer
450 views

I am trying to do 4 different plots with geom_density and put the count on my y-axis, then put them together with ggarrange. I am following this to be able to put count on my y-axis: Density plots ...
arezaie's user avatar
  • 345
0 votes
1 answer
128 views

I have the following data and the following graph. df <- data.frame(col1 = rnorm(1000, 0, 0.05), col2 = rnorm(1000, 0, 0.05)) ggplot(data = df, mapping = aes(x = col1, y = col2)) + ...
David Moore's user avatar
  • 1,026
0 votes
1 answer
98 views

Suppose I have a list of data points of the form (xi, yi, zi) and I want to plot a 2D density plot with it. In mathematica, you just call the function ListDensityPlot function. In python, it seems ...
an offer can't refuse's user avatar
1 vote
1 answer
247 views

I have a scatter plot that I'm making but when I switch between mcolors.Normalize and mcolors.LogNorm the color bar is not consistent between the two figures - I would think that the normalized color ...
BML's user avatar
  • 303
0 votes
1 answer
106 views

I have a dataset of different conditions with values of length. I can make histograms/density plots out of it and can facet wrap it for comparison to the control condition. I can also make individual ...
Cooper's user avatar
  • 1
0 votes
2 answers
170 views

Trying to create 1D kernels from data observations (weekly time points). I have been using the density() function from the stats R package. I am doing this so I can take the ratio of a treatment's pdf ...
lmbradley's user avatar
  • 113
0 votes
1 answer
119 views

I am trying to create a density plot that changes color at the average value of variable. However, when I create the split instead of maintaining its from as one distinct density chart it splits into ...
Rmullen53's user avatar
-2 votes
1 answer
2k views

200 people were tested, 20 of those were infected. I want to get a posterior distribution for the uncertainty associated with the probability that a person is infected. I do this like this: n<-200 ...
lala345's user avatar
  • 125
3 votes
1 answer
427 views

As an example, here a stacked density chart based on diamonds. A simple table suggests that "Fair" cut should be quite uncommon, and "Ideal" the most common, etc..., but the five ...
tjebo's user avatar
  • 24.1k
3 votes
0 answers
53 views

Reproducible example: require(ggplot2) set.seed(7) # generate data a <- runif(100, min=0, max = 50000) c <- sample(c("A", "B"), 100, replace =T) c <- factor(c) df <- ...
Reader 123's user avatar
0 votes
0 answers
55 views

I am trying to replicate a plot in Figure 8 of this "https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2012JD017979" article using precipitation data. Basically, it shows the distribution ...
Kumah Kingsley Kwabena's user avatar
0 votes
2 answers
802 views

I am trying to change the line type of a density curve, just so that it stands out relative to the rest of the density curves that I have on the same plot. However, the issue is that when I use the &...
Android17's user avatar
  • 105
0 votes
2 answers
431 views

I was wondering whether it was possible to use mpl-scatter-density or datashader to create a 1D scatter plot colored by density as it is shown here for the 2D case. It can be done with gaussian_kde, ...
Rober's user avatar
  • 23
3 votes
1 answer
802 views

I am trying to do what I thought would be an easy task, but I am stuck. I just want to display a density plot as percentages, but ggplot2::scale_y_continuous() does not seem to work the way I expect ...
DaniCee's user avatar
  • 3,247
1 vote
1 answer
362 views

I would like to get only one curve that is the "average" of all curves in order to get the "average trend". In my specific case, it is to average simulations I made. Using this ...
Camillionnaire's user avatar
0 votes
2 answers
203 views

TLDR; Can I force the bubble coordinates onto a uniform grid? I've made this figure to visualize the relationship between physical oceanographic variables (SST and HCI) and the total number of fish ...
blitz1259's user avatar
0 votes
1 answer
20 views

I have the next dataset: structure(list(working_hours = c("Whours_after", "Whours_after", "Whours_before", "Whours_before", "Whours_before", "...
user3483060's user avatar
0 votes
0 answers
21 views

i want to be able show density curve of the results of the bootstrap sample done in the package boot. The package allows plot() to be used to graph histogram But i cannot work out how to add density ...
user4891693's user avatar
0 votes
1 answer
687 views

I feel like this should be easy but It's been hours of searching and I can't find anything. I have a density curve below made with the following code ggplot()+ geom_density(data = onlyOne, aes(...
3luke33's user avatar
  • 37
2 votes
2 answers
145 views

I simply cannot get a density plot for the following data set: A single y Varibale and corresponding year I have tried copying code and simply modifying and i simply can't get it to work. I need to ...
Artesanal_Panettone's user avatar
0 votes
1 answer
102 views

I made a Boxplot with connected data and I am trying to add a density plot. The problem is that the density plot seems to be on a different scale. This is what the plot looks like It's clear that the ...
Glu's user avatar
  • 327
0 votes
1 answer
178 views

I'm drawing density plot with ggplot, but in the output it inverts the name of the colors! This is my script: ggplot(dataset) + geom_density( aes( x = `Real Wage 1`, fill = "red"), alpha =...
io_boh's user avatar
  • 323

1
2 3 4 5
13