You should use:
theme(legend.key.size = unit(3,"line"))
Related Contents:
- Plotting two variables as lines using ggplot2 on the same graph
- Add regression line equation and R^2 on graph
- ggplot2 line chart gives “geom_path: Each group consist of only one observation. Do you need to adjust the group aesthetic?”
- Multi-row x-axis labels in ggplot line chart
- Storing ggplot objects in a list from within loop in R
- Split violin plot with ggplot2
- Special variables in ggplot (..count.., ..density.., etc.)
- Customize axis labels
- How to put labels over geom_bar in R with ggplot2
- Label points in geom_point
- How can I extract plot axes’ ranges for a ggplot2 object?
- geom_rect and alpha – does this work with hard coded values?
- Subscript letters in ggplot axis label
- ggplot, drawing line between points across facets
- Ignore outliers in ggplot2 boxplot
- Create discrete color bar with varying interval widths and no spacing between legend levels
- Plot correlation matrix into a graph
- ggplot combining two plots from different data.frames
- How to center stacked percent barchart labels
- How to draw lines outside of plot area in ggplot2?
- How do you add a general label to facets in ggplot2?
- How to set multiple legends / scales for the same aesthetic in ggplot2?
- How to display only integer values on an axis using ggplot2
- Printing multiple ggplots into a single pdf, multiple plots per page
- Use different center than the prime meridian in plotting a world map
- geom_boxplot with precomputed values
- Add percentage labels to a stacked barplot
- I have 7 different data points for virus concentration collected at 3 different time points. How do I graph this with error bars in R?
- Making a stacked area plot using ggplot2
- How subset a data frame by a factor and repeat a plot for each subset?
- How to italicize part (one or two words) of an axis title
- Reproducing lattice dendrogram graph with ggplot2
- Adding labels to ggplot bar chart
- ggplot2 heatmaps: using different gradients for categories
- Two geom_points add a legend
- ggplot2: Setting geom_bar baseline to 1 instead of zero
- Legend on bottom, two rows wrapped in ggplot2 in r
- set only lower bound of a limit for ggplot
- Add a horizontal line to plot and legend in ggplot2
- Choropleth map in ggplot with polygons that have holes
- Change geom_text’s default “a” legend to label string itself
- “Density” curve overlay on histogram where vertical axis is frequency (aka count) or relative frequency?
- How to make variable bar widths in ggplot2 not overlap or gap
- using two scale colour gradients on one ggplot [duplicate]
- How to change angle of line in customized legend in ggplot2
- set ggplot plots to have same x-axis width and same space between dot plot rows
- ggplot for loop outputs all the same graph
- How do I change the number of decimal places on axis labels in ggplot2?
- ggplot scale color gradient to range outside of data range
- Greek letters, symbols, and line breaks inside a ggplot legend label