All Questions
75
questions
0
votes
1
answer
40
views
How to reverse legend order without affecting bar order in Plotly R? [duplicate]
I am creating a stacked bar chart using Plotly in R, and the order of the items in the legend is the reverse of the order that I want.
library(dplyr)
library(plotly)
library(forcats)
set.seed(1)
df &...
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), ...
1
vote
1
answer
105
views
How to customize the legend order for a 3D scatter plot?
I'm trying to generate a 3D scatter plot and the shapes of markers correspond to 'Treatment' (IC, IT, YS), whilst, the colors correspond to 'Time' (0, 2, 4, 6, 12, 24, 48, 72). Everything went well ...
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 ...
0
votes
0
answers
32
views
Placement of plotly legend labels
Plotly places legend labels to the right of their respective "boxes" by default. If possible, I would like to place the labels below the boxes.
I have produced a plotly figure with ...
1
vote
0
answers
56
views
Add a legend in plotly button graph
With plotly in R, I want to use the buttons to change the data. I've almost managed to make the graph I wanted, except that the legend doesn't appear. I tried adding
name = ~B but it doesn't work the ...
1
vote
1
answer
250
views
How to make the legend appear in a stacked bar chart with `plotly` in R
I want to make a stacked bar chart with a slider in plotly.
I took inspiration from the plotly website.
I can't manage to insert the legend, maybe because I didn't use the legendgroup argument ...
1
vote
1
answer
132
views
legendrank in R plotly - bug or user error?
I encountered unwanted behaviour using plotly (4.10.1) in R with regards to the order that legends appear.
I have raised a formal issue at https://github.com/plotly/plotly.R/issues/2233 ; however I ...
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 ...
2
votes
1
answer
91
views
Show single legend for grouped 3D lines in R plotly
The default behavior of plotly is to automagically add several legends when the data is grouped by a variable. In my case, I would like set only one legend despite the group. Is this possible at all? ...
1
vote
1
answer
160
views
Keep colours the same between facetted plots / subplots
Following the R plotly documentation, facetting happens by splitting a dataset on 1 variable, and then applying the same plot function on each split, and finally combining the plots using subplot.
If ...
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
votes
1
answer
242
views
Add labels to lines plotly
I needed some help labeling some overlaying lines in plotly.
I have a dataframe that consists of the following columns:
df$date = c("2014-09-30","2016-03-31","2016-03-31")...
1
vote
1
answer
4k
views
R+Plotly: Customize Legend Entries
I must be having trouble with less than a one liner,
but have a look at the snippet below: I cannot the legend option to enter the text that I want in the legend as the name of the species (say, &...