Skip to main content

All Questions

Tagged with
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 (...
vgall's user avatar
  • 11
1 vote
1 answer
925 views

Python Plotly object with legend for different marker_color

I want to add a legend for each marker_color on my second trace below but I can't figure out how to make it happen through the graph objects. Any idea? import plotly.graph_objects as go fig = go....
Ad D's user avatar
  • 191
0 votes
1 answer
234 views

How to reverse scale on legend in plotly?

I am using plotly on python. I have a legend which is a colour scale 0-100%. Currently 100 is at the top and 0 at the bottom. I want 100 to be the bottom and 0 the top. Is this possible?
nabzzzz's user avatar
  • 21
2 votes
1 answer
872 views

Plot_ly in R: How to include a colorbar, symbols and the size of markers in a legend?

I have a scatter plot with data points at the coodinates "test_Xn" & "test_Yn". Additional informations about those data points is stored in the columns "Item_1", &...
Finn Jonas's user avatar
2 votes
1 answer
754 views

How to customize plotly legend order?

I want to change the ordering of legend in my boxplot from 1-12, or perhaps even renaming them to Jan, Feb, etc. Any idea how could I do it? def make_box_plot(data, xdata, ydata, title, legend): ...
David L.E's user avatar
  • 105
2 votes
1 answer
972 views

Group each "graph dimension" in the legend of Plotly

I would like to add to the Plotly "standard legend" produced by plotly.express each of the "graph dimensions" grouping together all traces of such characteristics. As it is ...
user171780's user avatar
  • 2,858
7 votes
1 answer
13k views

Position 'add_vline' annotation text vertically and center mid-point on vertical line

import plotly as plotly from plotly.offline import plot import plotly.express as px import pandas as pd import numpy as np df = pd.DataFrame({'height': [712, 712, 716, 716, 718, np.nan, np.nan, np....
Diop Chopra's user avatar
1 vote
1 answer
4k views

Manually defined legend in Plotly on Python

I have some data that is broken down by day. For each day, I have a datapoint at the start and end of the day, each with a value between 0 and 100. I need to display this data as a grouped bar plot ...
Tuck's user avatar
  • 13
0 votes
2 answers
739 views

Arrange legends plotly

I want to arrange the legend for my pie chart which I have built using plotly, by default it arranges the legend having the highest distribution first and with lower distribution after it, but i want ...
Abhishek Mishra's user avatar
0 votes
1 answer
128 views

Remove double legend plotly in R

I don't know why I have a double legend. How to remove the second legend where it is written Aa Code: city = c("paris", "lyon", "lyon", "marseille", "...
Nathancia971's user avatar
3 votes
1 answer
439 views

Plot_ly contour plot in R common legend range colors not showing up correctly

I have created this contour plot with 5 subplots and common legend. As can be in the figure here, the min and max colors of the legend are based only on first subplot and not correct across all 5 ...
T.P.'s user avatar
  • 63
3 votes
2 answers
10k views

Plotly: How to add a text box under legend?

I use this example code given in plotly website. import plotly.express as px df = px.data.medals_long() fig = px.bar(df, x="medal", y="count", color="nation", ...
aj7amigo's user avatar
  • 368
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", ...
aj7amigo's user avatar
  • 368
1 vote
1 answer
1k views

Invert the order of the legend

I have written a function to create plotly line graphs for my shiny dashboard. The order of the legends do not seem right. For some reason it is showing reverse of what is in the data frame. I want ...
sutsabs's user avatar
  • 455
0 votes
1 answer
463 views

How can I fix this legend labels issue in plotly (Python)?

Heres the code for Line Plot with column encoding color from website: plotly. import plotly.express as px df = px.data.gapminder().query("continent=='Oceania'") fig = px.line(df, x="...
Girish Kumar Chandora's user avatar

15 30 50 per page
1 2 3
4
5
11