If I understand the issue correctly, specifying group=1
and adding a stat_summary()
layer should do the trick:
ggplot(hist, aes(x=weekday, y=counts, group=1)) +
geom_point(stat="summary", fun.y=sum) +
stat_summary(fun.y=sum, geom="line")
More Related Contents:
- Plot two graphs in same plot in R
- Remove ‘a’ from legend when using aesthetics and geom_text
- ggplot2 – bar plot with both stack and dodge
- Generate multiple graphics from within an R function
- How can I make consistent-width plots in ggplot (with legends)?
- Change bar plot colour in geom_bar with ggplot2 in r
- Specification of first and last tick marks with scale_x_date
- Avoid ggplot sorting the x-axis while plotting geom_bar()
- Unicode Characters in ggplot2 PDF Output
- Use stat_summary to annotate plot with number of observations
- R – image of a pixel matrix?
- Eliminating NAs from a ggplot
- ggplot2: How to specify multiple fill colors for points that are connected by lines of different colors
- Remove grid, background color, and top and right borders from ggplot2
- Setting y axis breaks in ggplot
- R knitr Markdown: Output Plots within For Loop
- Generate paired stacked bar charts in ggplot (using position_dodge only on some variables)
- Create heatmap with values from matrix in ggplot2
- facet_wrap add geom_hline
- Improve centering county names ggplot & maps
- How to draw a nice arrow in ggplot2
- Bars in geom_bar have unwanted different widths when using facet_wrap
- beautiful Pie Charts with R
- Generate ggplot2 boxplot with different colours for multiple groups
- Connect stack bar charts with multiple groups with lines or segments using ggplot 2
- Set number of columns (or rows) in a facetted plot
- photo alignment with graph in r
- Color points with the color as a column in ggplot2 [duplicate]
- Add raster to ggmap base map: set alpha (transparency) and fill color to inset_raster() in ggplot2
- Plotting pca biplot with ggplot2