All Questions
153
questions
2
votes
1
answer
457
views
Need legend to communicate color for plotly graph go.Heatmap
I'm having a bit of trouble trying to figure out how to have the legend indicate color for my plotly graph objects heatmap. The legend only needs to communicate the graph colors and what they mean. ...
0
votes
1
answer
1k
views
Fixed margin for legend in Plotly Python
I have a dynamic size of plot in plotly, depending on number of bars:
I use such parametrization for legend position:
fig.update_layout(
bargap=0.1,
barmode='stack',
yaxis={
...
0
votes
1
answer
453
views
Combine entries in a single legend from Plotly subplots - python
The following plots two separate scatterplots using Plotly. I want to combine the points from each subplot into a single legend. However, if I plot the figure as is, there are some duplicate entries. ...
0
votes
1
answer
1k
views
Include legend for go.scattermapbox subplot figure - Plotly
The following figure produces two subplots using scattermapbox in Plotly. I've included a function that assigns a specific color to each unique category. This all works fine but I'm hoping to include ...
1
vote
1
answer
749
views
How can I copy text from a single legend entry in plotly graphic?
I'm trying to select the text of a single entry/trace from a plotly plot.
By default, text is not selectable at all from my plot, which I generated like this:
In my R Markdown script, an R code chunk ...
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
0
answers
249
views
Plotly legend marker opacity and spacing
Is it possible to access the symbols in a legend? I would like to set their opacity to a higher value than the opacity of my trace markers, and ideally I would like to make them tighter (in the sense ...
1
vote
0
answers
173
views
Plot a list of matrices as plotly subplots with shared traces
Spoiler: This post is related to this one, but I am looking for an automated way to solve the following problem: I want to plot a list of matrices, where each matrix is plotted as a subplot. The ...
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
0
answers
189
views
Plotly graph legend groups feature is different when using fig.show() and Flask
I am developing a Flask application and a graph I am plotting with Plotly needs groups in the legend.
I followed this answer to achieve what I wanted. It works well when showing the graph with 'fig....
2
votes
1
answer
1k
views
Bubble size legend with Python Plotly
I have created a bubble graph with Python Plotly. In the example below, the size of the bubble represents the size of the population for different countries. I would like to add the bubble size in the ...
1
vote
1
answer
1k
views
Plotly Custom Legend
I have a plotly plot which looks like this:
The Code I am using is below:
fig = make_subplots(specs=[[{"secondary_y": True}]])
fig.add_trace(go.Scatter( x = pf['Timestamp'], y = pf['Price_A'...
-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")...
4
votes
2
answers
14k
views
How can I put different legends to subplots in plotly?
I am still designing what kind of plot with subplots I want to do but when we see the example in the documentation Multiple Subplots with Titles we have
from plotly.subplots import make_subplots
...
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, &...