1
vote
0answers
31 views

ggplot2 color gradient along geom_segment()

I have a set of origin and destination coordinates, and I'm drawing line segments in between them. The thing is, I would like to indicate the direction of the line using color instead of the arrows ...
0
votes
1answer
50 views

How can I plot the relative proportions of two groups using a fill aesthetic in ggplot2?

How can I plot the relative proportions of two groups using a fill aesthetic in ggplot2? I am asking this question here because several other answers on this topic seem incorrect (ex1, ex2, and ex3), ...
2
votes
2answers
60 views

using stat_summary_hex to show most frequent value with discrete color scale

I have a data frame with 10k rows and 3 columns: xpos, ypos and cluster (cluster is a number from 0 to 9) here: http://pastebin.com/NyQw29tb I would like to show a hex plot with each hexagon colored ...
0
votes
0answers
54 views

Clipping stat_density2d plot by polygon in ggplot2

I am plotting 2d density map of github profiles in continental US. Dataframe looks like this: > head(f) login id location lat long 1 defunkt 2 San Francisco 37.78300 ...
-1
votes
1answer
36 views

Generating boxplot in R

I have data that looks like this: tc td 3 400 3 430 4 200 4 240 5 120 3 470 ... and so on. I would like to generate a boxplot(using default plotters or ggplot2) that groups ...
1
vote
0answers
103 views

plotting numerous pie plot with ggplot2

I am trying to plot 5625 (75*75), in ggplot2; It takes ages, and the quality of plot at the end is relatively low. Is there any other alternative, to plot such a thing?! mydata = ...
3
votes
2answers
298 views

ggplot, facet, piechart: placing text in the middle of piechart slices

Trying to produce piechart with ggplot and facing the problem with placing text in the middle of each slice: dat = read.table(text = "Channel Volume Cnt AGENT high 8344 ...
0
votes
1answer
94 views

How to add multiple lines using ggplot given two vectors of their coefficients without using for loop? [closed]

Using for loop is significantly slower and just doesn't seems right. I would greatly appreciate it if someone could use some other method with geom_abline(intercept, slope). The variable Coeff is a ...
1
vote
1answer
226 views

ggplot2, color segment of geom_segment

I'm working on a rather elaborate plot of some indoor and outdoor activities, and I'm kinda stuck. I want to add colorize the minutes spent indoor/outdoor by (Xmin, Ymin, and Zmin) in the geom_segment ...
0
votes
1answer
277 views

changing ggplot factor colors?

I notice that here Box and whiskers plot the call: p + geom_boxplot(aes(fill = factor(cyl))) generates bright red/green/blue colors for boxplots fill, while: p + geom_boxplot(aes(fill = ...
0
votes
0answers
52 views

How does one creates a `ggplot2` plot that is composed of stacked squares? [duplicate]

I would like to use R to create a plot (preferably with ggplo2) that looks like this one: In this plot, every bar is composed of various numbers of squares, when each square designates a given ...
3
votes
2answers
165 views

How to use different shapes for every point in ggplot

I am plotting a 4 dimensional data set. Beyond the x-axis and y-axis, I want to represent the 3rd and the 4th dimension by rectangles of different width and height. Can I do this with ggplot? Thanks. ...
0
votes
0answers
186 views

How can I visualize the data causing an interaction effect in a linear model?

I have a linear model that includes two continuous variables X and Y and their interaction X:Y. The main effect coefficient of X is effectively zero (and ns), but the interaction coefficient is ...
1
vote
0answers
233 views

customized scale_y_continuous() within facet_grid() in ggplot2

I am looking to add an additional white line to the background grid and a additional tick mark, but only within the facet Low Tide, is that in any way possible? I imagine i would be possible to add a ...
2
votes
1answer
185 views

Visualize aggregate data using ggplot2

I have some aggregate data that I would like to visualize using ggplot2 and I am now looking for a smart shortcut to plot aggregate data? The data I have looks like this, (I currently only have data ...

1 2 3 4
15 30 50 per page