You should use:
theme(legend.key.size = unit(3,"line"))
More Related Contents:
- Several questions on ggplot2 [closed]
- Multirow axis labels with nested grouping variables
- How to change legend title in ggplot
- Consistent width for geom_bar in the event of missing data
- Conditionally change panel background with facet_grid?
- Editing legend (text) labels in ggplot
- Overlaying histograms with ggplot2 in R
- ggplot2 0.9.0 automatically dropping unused factor levels from plot legend?
- Merge and Perfectly Align Histogram and Boxplot using ggplot2
- Grouped barplot in R with error bars
- Plotting multiple time-series in ggplot
- Plotting with ggplot2: “Error: Discrete value supplied to continuous scale” on categorical y-axis
- How do I change the color value of just one value in ggplot2’s scale_fill_brewer?
- Two geom_points add a legend
- ggplot, drawing multiple lines across facets
- Add a horizontal line to plot and legend in ggplot2
- How to use subscripts in ggplot2 legends [R]
- ggplot2: How to use same colors in different plots for same factor
- R: ggplot2 barplot and error bar
- ggplot2 – The unit of size
- How to make variable bar widths in ggplot2 not overlap or gap
- Apply a ggplot-function per group with dplyr and set title per group
- How to use empty space produced by facet_wrap?
- pie chart with ggplot2 with specific order and percentage annotations
- Plotting multiple graphs in R [closed]
- Changing format of some axis labels in ggplot2 according to condition [duplicate]
- Spacing between boxplots in ggplot2
- Add axis tick-marks on top and to the right to a ggplot?
- Creating a vertical color gradient for a geom_bar plot
- heatmap-like plot, but for categorical variables