All Questions
7
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 &...
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 ...
3
votes
1
answer
198
views
A legend marker for each unique texture in the same bar trace, with Plotly Graph Objects in Python
I have the following code as example:
x=[1,2,3,4]
y=[2,2,4,3]
colors = ["blue","blue","orange","blue"]
textures = ["","","x","...
2
votes
2
answers
3k
views
Plotly: How to rename legend elements of a plotly express stacked bar plot?
I use this example code given in plotly website.
import plotly.express as px
long_df = px.data.medals_long()
fig = px.bar(long_df, x="nation", y="count", color="medal", ...
0
votes
0
answers
115
views
Is there a way to breakdown a legend of plotly python for combined chart?
As in subject of my question. I was trying few approaches to solve this issue, but I have run out of ideas. How can I display in legend 12 small rectangles with symbology of individual month (and ...
33
votes
3
answers
49k
views
Customizing the order of legends in plotly
I am trying to customize the order of legends while plotting stacked bar plots in plotly,python.
data = [
go.Bar(
y=df['sid'], # assign x as the dataframe column 'x'
...
0
votes
1
answer
461
views
Subplot grouped legend for grouped bar charts
I am trying to add a subplot grouped legend to series of GROUPED bar charts in plotly. I've found numerous examples of subplot grouped legends for charts generally (like the last graphical example ...