Tagged Questions
5
votes
2answers
84 views
Hierarchical / Multilevel pie chart
Is there any way to create a chart like this in R?
I have not found any example, yet.
EDIT:
Here is an extract of the data shown in the chart:
df <- structure(list(Animal = structure(c(2L, ...
0
votes
1answer
22 views
ggplot2: plotting bars when using stat_summary()
Here is my current script and the output:
ggplot(data.and.factors.prov,aes(x=assumptions,y=FP,
colour=factor(Design.Complexity))) +
...
0
votes
1answer
27 views
setting black/grey color scheme for ggplot2?
How can I set a black/grey/dark color scheme for ggplot2 (analogous to "theme_bw") for ggplot2, without manually specifying the color? i.e. have something like:
ggplot(mtcars) + ...
0
votes
1answer
31 views
making binned scatter plots for two variables in ggplot2 in R
I have a dataframe with two columns x and y that each contain values between 0 and 100 (the data are paired). I want to correlate them to each other using binned scatter plots. If I were to use a ...
0
votes
0answers
41 views
Highlight the greatest value with in a geom_point graph created with ggplot2 package
I am making a plot with ggplot2 package from R. I need to highlight the greatest value for each categorical variable, there is my code:
datos <- ...
3
votes
1answer
67 views
ggplot2: Scatterplot with ugly margins when using log scale
I have a somewhat "weird" twodimensional distribution (not normal with some uniform values, but it kinda looks like this.. this is just a minimal reproducible example), and want to log-transform the ...
2
votes
1answer
51 views
ggplot2: Use both scientific notation and full numbers
I have a ggplot2 plot,histogram produced as follows:
library("ggplot2")
library("scales")
df <- data.frame(test = rnorm(1000, 1000, 40000))
p <- ggplot(df, aes(x = test)) + ...
0
votes
1answer
52 views
plotting multiple variables in ggplot
I have a data table which looks like this-
pos gtt1 gtt2 ftp1 ftp2
8 100 123 49 101
9 85 93 99 110
10 111 102 53 113
11 88 110 59 125
12 120 118 61 133
13 90 136 64 145
14 ...
0
votes
1answer
30 views
Limiting the number of categories on facets in a facet plot
I'm making a facet_grid plot using the following approach:
sample <- read.csv('sample.csv')
ggplot(sample, aes(category, count)) + geom_bar() + facet_grid(. ~ parent_id)
My data is structured ...
2
votes
0answers
47 views
Creating arrow head matching size (or lwd) in ggplot2
To draw arrows in ggplot, I use geom_segment and arrow=arrow().
I would like the arrow head size to match the segment width (or size).
However, arrow does not recognize variables directly from the ...
0
votes
2answers
26 views
R: A box for the legends and labels written at a given angle with ggplot2 package or barplot function
My question is certainly a repeat but I can't figure out how to achieve what I aim to make.
Here is my data:
v1=c(46.55172, 13.79310, 29.31034, 1.72414, 5.17241, 3.44828, 0.00000, 0.60241, ...
1
vote
1answer
32 views
remove graph labels from GGPLOT2 graph
I have produced the following graph:
Now i have the problem is that the names in the grey area above and on the left, are making the graph confusing so i need to remove them. is there a easy way to ...
0
votes
1answer
34 views
Numbering multiple plots in ggplot2
I need to plot multiple plots on a page. I'd like to have a letter on the top left of each plot (e.g. A or B etc). How would I do this with ggplot2?
It's not mentioned in the ggplot2 manual (Hadley ...
0
votes
0answers
31 views
x and y variables are from different data frame (ggplot2)
I'm learning ggplot2 so please excuse my novice understanding.
Is there a way to do a simple scatter plot when x and y are from two different data frames? For example:
p <- ggplot(data=df1, ...
0
votes
2answers
47 views
Plotting multiple functions and adding legends for them in ggplot2
I want to plot y=log(1+x) and y=x in the range [-0.25, 0.25]. Here is my code so far -
library(ggplot2)
log1plusx <- function(x) log(1+x)
self <- function(x) x
ggplot(data.frame(x=c(-0.25, ...