All Questions
17
questions
0
votes
0
answers
41
views
R's plotly ggplotly removing legend from a geom_point
I'm generating a simple geom_point plot with R ggplot2:
library(dplyr)
library(ggplot2)
set.seed(1)
df <- matrix(runif(16, 0, 10), nrow = 4, ncol = 4, dimnames = list(paste0("R", 1:4), ...
0
votes
0
answers
26
views
Entrywidth argument not working in R plotly
I am trying to make an interactive plot with the plotly package. The legend needs to be next to the image and have a certain width. I now have the issue that the default appears to be that the legend ...
1
vote
2
answers
60
views
Unwanted characters in GGPlot 2 legend entries for stacked area chart
Good day,
I need to prepare a graph showing the proportions of the various biomass components, but it is showing ,1 after each component in the legend in R, Ggplot2. I only want to see the list of ...
6
votes
3
answers
1k
views
plotly drops grouped legend (by color, by symbol) when converted from ggplot
I don't quite understand why the legend disappeared when I converted a plot made by ggplot to plotly using ggplotly. The plotly help page did not have any information. I don't think their examples ...
3
votes
1
answer
726
views
ggplot legend disappears when using ggplotly()
I am trying to keep a legend which is generated when I use ggplot, but upon applying plotly the legend disappears. Here is my code:
ggplotchange <- ggplot(data = map.world1, aes(x = long, y = lat, ...
1
vote
1
answer
51
views
I cannot add source to this chart, nor can I remove legend title
I have created a simple interactive chart, of Brazil bank NPLs (no longer interactive as saved as a png) using the below code, but need to refine the aesthetics a bit more to exclude the legend title (...
3
votes
2
answers
2k
views
Plotly subplots - legend item next to its plot [duplicate]
When using plotly subplots, here's a typical example (from https://plotly.com/python/subplots/):
from plotly.subplots import make_subplots
import plotly.graph_objects as go
fig = make_subplots(rows=3,...
0
votes
0
answers
731
views
Hide a specific legend in scale_color_manual() when using plotly() at the end
I have a data frame df.europeCoords which looks like this:
And I plot a Europe map with the following code:
## Plot the map: ##
p <- ggplot(data = df.europeCoords, aes(x = longitude, y = ...
0
votes
0
answers
100
views
ggplot legend in R is showing extra dates between the only 2 dates in my data
First question here and couldn't find an answer online.
I am comparing values (value at risk) between two dates, February 3, 2020 and January 21, 2020 across a few variables (trading strategies). In ...
3
votes
1
answer
3k
views
Arrange 4 plotly pie graphs in R
I have four separate pie graphs all with the same specified color scheme (the code is identical apart from the dataframe).
The colors are designated because I want to combine them in the 4 grid ...
4
votes
2
answers
826
views
Controlling the shared legend when adding a ggplot dendrogram plot to a plotly heatmap
I have genes x samples expression data I'd like to generate a plotly heatmap for and add the samples dendrogram ggplot to.
Here are my data:
set.seed(1)
mat <- matrix(rnorm(100*10),100,10,...
6
votes
1
answer
984
views
extra variables in legend when wrapping ggplot2 in plotly R
I am having trouble making the legend of the following ggplot wrapped in ggplotly() show only one aesthetic. It currently shows three variables (shape, color, linetype) for each legend entry, but I ...
3
votes
1
answer
5k
views
Changing legend labels in ggplotly()
I have a plot of polygons that are colored according to a quantitative variable in the dataset being cut off at certain discrete values (0, 5, 10, 15, 20, 25). I currently have a static ggplot() ...
4
votes
0
answers
450
views
in R, creating multi column legend in ggplotly
How do you spread a legend over multiple columns in ggplotly?
The answer here makes it obvious how to do so using ggplot() - however that code doesn't seem to work when I use ggplotly()
library(...
1
vote
0
answers
498
views
Plotly - ggplot2 - can't hide repetitive legend text
I'm trying to hide what have become triplicate legend text in plotly using ggplot2. When I render the graph in ggplot, the legend is gone (as I would expect with my code). When I render the graph in ...