All Questions
2,484
questions
0
votes
0
answers
18
views
How to plot the legend with combined_plot (ggplot2)
I created this script to display some environmental impacts for my research.
`legend_plot <- ggplot(data_longGW, aes(x = Crop_cycleGW, y = kg_CO2_eq, fill = Category)) +
geom_bar(stat = "...
1
vote
1
answer
34
views
Legend key color when combining ggOceanMaps and ggspatial
I am trying to combine basemap from ggOceanMaps with geom_spatial_point and having the geom_spatial_point having a new color scale.
When I combine these two, the legend.key background color remains ...
0
votes
0
answers
23
views
How to color the legend labels in ggplot [duplicate]
Using the iris dataset, we can make a boxplot and customise the legend when plotting using ggplot like so:
ggplot(data = iris, aes(x=Species, y=Sepal.Length, fill=Species))+
geom_boxplot()+
...
1
vote
1
answer
37
views
ggplot of multiple geom_sf datasets gives mismatched legend colours
I am trying to create a ggplot map which includes two simple feature line datasets. I would like the lines to either appear in the same legend, or a separate legend. However the approach I am taking ...
-1
votes
1
answer
44
views
Why is scale_fill_manual() adding a second legend to my linegraph? [closed]
I am trying to create a linegraph showing population change over time for two species. I managed to create the graph how I want it to be and am now trying to alter the aesthestics for a public poster. ...
1
vote
2
answers
46
views
adjusting the legend in TramineR plots
I am new to using TramineR and I just cannot seem to figure out how to arrange the legend in any of the plot types. The legend keeps being cut off by the plots. I have tried to use the seqlegend ...
0
votes
0
answers
28
views
Having problem adding legend onto my ggplot when ggplot's data argument is NULL [duplicate]
New to r here, so please bear with me. I am sure this is something simple to solve. I have this plot here and want to add a legend to distinguish which line represents the "Tailwater Gauge" ...
2
votes
1
answer
34
views
Rotating/angle of ggplot key_glpyh, custom legend key glyph
I am trying to emulate a plot style ive seen online, created by Chris Canipe (https://www.axios.com/2017/12/15/the-flow-of-goods-between-states-1513304375). Looking at trade flows, I've managed to ...
1
vote
1
answer
26
views
R Customize ggVennDigram legend based on internally defined categories of mapped colors - not counts nor individual intersections
First time posting here...
I have a Venn diagram where I have coded certain regions of intersections based on internally defined categories. I want to produce a legend that reflects those categories.
...
0
votes
1
answer
37
views
Trying to remove the background of color icon in ggplot legend
I'm trying to remove the gray box behind the color icon in the legend of this graph. Wondering if the issue is that I'm using geom_col() so the color aesthetic is just the outline of the column. Does ...
0
votes
1
answer
48
views
Reorder legend levels in CalendR
Using CalendR to plot fishing days for boats. How do you go about reordering legend levels e.g. boat names first then public holidays last?
Load packages, create events & plot calander:
## load ...
0
votes
0
answers
20
views
Increase spacing in ggplot legend items [duplicate]
I have two shapefiles of a Country, one containing the geometry of the municipalities and the other regarding the border of the regions of the country. I have to plot the country with the ...
0
votes
1
answer
39
views
Edit legend title in ggplot2 (3.5.1) [duplicate]
I have successfully edited the x and y axis titles, but I'm stuck on the legend title and labels.
Here is the code I have run so far:
m.emo.plot <- interact_plot(model = m.emo, pred = cemodiff, ...
0
votes
1
answer
26
views
How to avoid overlapping legends for multiple geom_point layers in ggplot2
I'm trying to create a chart with 2 geom_points and a geom_text_repel layer. When I display my legend, the geom_points overlap. The main data points should be represented as empty circles, while the &...
1
vote
1
answer
29
views
How to Add a Legend to a ggplot with two axes
I've put together this graph and I would like to be able to add a legend to it but can't seem to figure out why it's not showing up and how to easily add it.
data <- data.frame(group = LETTERS[1:5],...