legend

Legend for multi surface plot with specific colors

狂风中的少年 提交于 2020-12-13 07:12:35
问题 Take the example for plot_ly function: library("plotly") z <- c( c(8.83,8.89,8.81,8.87,8.9,8.87), c(8.89,8.94,8.85,8.94,8.96,8.92), c(8.84,8.9,8.82,8.92,8.93,8.91), c(8.79,8.85,8.79,8.9,8.94,8.92), c(8.79,8.88,8.81,8.9,8.95,8.92), c(8.8,8.82,8.78,8.91,8.94,8.92), c(8.75,8.78,8.77,8.91,8.95,8.92), c(8.8,8.8,8.77,8.91,8.95,8.94), c(8.74,8.81,8.76,8.93,8.98,8.99), c(8.89,8.99,8.92,9.1,9.13,9.11), c(8.97,8.97,8.91,9.09,9.11,9.11), c(9.04,9.08,9.05,9.25,9.28,9.27), c(9,9.01,9,9.2,9.23,9.2), c(8.99

Plotly: How to set up multiple subplots with grouped legends?

旧街凉风 提交于 2020-12-13 05:44:28
问题 for each subplot I have 3 seperate line:2017 ,2018 and 2019 with 3 times "go.Scatter", each subplot represents one country (25 countries) with always these 3 years. I can use the subplot sample code but then all the 75 legends (25 X 3) will be all together with different colors and it's messy. I don't need different colors amont different subplot, I can just have 3 different colors and 3 legends for the 3 years on all subplots, would be ideal if I click on for example 2017 that all the 2017

Plotly: How to set up multiple subplots with grouped legends?

|▌冷眼眸甩不掉的悲伤 提交于 2020-12-13 05:40:24
问题 for each subplot I have 3 seperate line:2017 ,2018 and 2019 with 3 times "go.Scatter", each subplot represents one country (25 countries) with always these 3 years. I can use the subplot sample code but then all the 75 legends (25 X 3) will be all together with different colors and it's messy. I don't need different colors amont different subplot, I can just have 3 different colors and 3 legends for the 3 years on all subplots, would be ideal if I click on for example 2017 that all the 2017

Is there a way to interactively turn off the legend in a python `Bokeh` plot

爱⌒轻易说出口 提交于 2020-12-12 12:05:12
问题 Hide legend in bokeh plot So I understand who to programmatically turn off the legend in a Bokeh plot, however I was wondering if there is a way to do this interactively? Sometimes I have a number of items in a plot legend, and the legend takes up lot of space or real estate. I was wondering if there is a way to click on the legend to hide it, or some such option? I know I can affect the legend visibility through the code: myPlot.legend.visible = False However I would to be able to turn the

Is there a way to interactively turn off the legend in a python `Bokeh` plot

ⅰ亾dé卋堺 提交于 2020-12-12 12:04:26
问题 Hide legend in bokeh plot So I understand who to programmatically turn off the legend in a Bokeh plot, however I was wondering if there is a way to do this interactively? Sometimes I have a number of items in a plot legend, and the legend takes up lot of space or real estate. I was wondering if there is a way to click on the legend to hide it, or some such option? I know I can affect the legend visibility through the code: myPlot.legend.visible = False However I would to be able to turn the

Is there a way to interactively turn off the legend in a python `Bokeh` plot

你说的曾经没有我的故事 提交于 2020-12-12 12:04:13
问题 Hide legend in bokeh plot So I understand who to programmatically turn off the legend in a Bokeh plot, however I was wondering if there is a way to do this interactively? Sometimes I have a number of items in a plot legend, and the legend takes up lot of space or real estate. I was wondering if there is a way to click on the legend to hide it, or some such option? I know I can affect the legend visibility through the code: myPlot.legend.visible = False However I would to be able to turn the

How to reduce the size of the legend in R Plot, while still making it readable?

时光怂恿深爱的人放手 提交于 2020-12-12 04:03:08
问题 I am trying to plot some data over years with two y-axes in R. However, whenever I try to include a legend, the the legend dominates my plot. When I use solutions suggested elsewhere like keyword and/or using the cex argument, suggested in another post here, it either becomes unreadable or is still too big. Here is my example with randomly generated data: #Create years year.df <- seq(1974, 2014, 1) # Create y-axis data set.seed(75) mean1 <- rnorm(length(year.df), 52.49, 0.87) mean2 <- rnorm

How to change color of text in plotly scatter and different marker?

心不动则不痛 提交于 2020-12-06 19:43:25
问题 I want use plot.ly to plot iris dataset. It has an color parameter in scatter data work like hue in seabron but it only change the color of marker and cant change the color of text and i cant find any why to change the marker type for each group of color. the code is : import plotly.express as px df = px.data.iris() fig = px.scatter(df, x="sepal_width", y="sepal_length", color="species", text='sepal_width') fig.update_traces(textposition='top center', textfont_size=14, textfont_color=c) fig