You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am using plotly.py version 1.9.7 and cufflinks version 0.7.2. When making a bubble chart, all the bubbles are the same color when I expect plotly to use different or alternating colors. Below is my code for creating offline bubble chart using cufflinks:
import pandas as pd
from plotly.offline import download_plotlyjs, init_notebook_mode, iplot
import cufflinks as cf
init_notebook_mode()
df = pd.read_csv('http://www.stat.ubc.ca/~jenny/notOcto/STAT545A/examples/gapminder/data/gapminderDataFiveYear.txt', sep='\t')
df2007 = df[df.year==2007]
iplot(df2007.iplot(asFigure=True, kind='bubble', x='gdpPercap', y='lifeExp', size='pop', text='country',
xTitle='GDP per Capita', yTitle='Life Expectancy', dimensions=(800,600)))
When I output the data/layout data, it shows that all the bubbles are indeed given one color "rgb(255, 153, 51)". I can get the data and layout data by running this:
So for some reason, plotly gives all 142 markers/bubbles just one color "rgb(255, 153, 51)". Is there a way to tell plotly to change the colors for each bubble? Perhaps this is problem on cufflinks side?
The text was updated successfully, but these errors were encountered:
Hello, I am using plotly.py version 1.9.7 and cufflinks version 0.7.2. When making a bubble chart, all the bubbles are the same color when I expect plotly to use different or alternating colors. Below is my code for creating offline bubble chart using cufflinks:
When I output the data/layout data, it shows that all the bubbles are indeed given one color "rgb(255, 153, 51)". I can get the data and layout data by running this:
The output is rather large, so I only paste a portion of it:
{'data': [{'marker': {'color': ['rgb(255, 153, 51)',
'rgb(255, 153, 51)',
'rgb(255, 153, 51)',
'rgb(255, 153, 51)',
'rgb(255, 153, 51)',
'rgb(255, 153, 51)',
'rgb(255, 153, 51)',
'rgb(255, 153, 51)',
'rgb(255, 153, 51)',
'rgb(255, 153, 51)',
'rgb(255, 153, 51)',
'rgb(255, 153, 51)',
'rgb(255, 153, 51)',
'rgb(255, 153, 51)',
'rgb(255, 153, 51)',
'rgb(255, 153, 51)',
'rgb(255, 153, 51)',
'rgb(255, 153, 51)',
'rgb(255, 153, 51)',
'rgb(255, 153, 51)',
'rgb(255, 153, 51)',
'rgb(255, 153, 51)',
'rgb(255, 153, 51)',
...
'layout': {'height': 600,
'legend': {'bgcolor': '#F5F6F9', 'font': {'color': '#4D5663'}},
'paper_bgcolor': '#F5F6F9',
'plot_bgcolor': '#F5F6F9',
'titlefont': {'color': '#4D5663'},
'width': 800,
'xaxis1': {'gridcolor': '#E1E5ED',
'showgrid': True,
'tickfont': {'color': '#4D5663'},
'title': 'GDP per Capita',
'titlefont': {'color': '#4D5663'},
'zerolinecolor': '#E1E5ED'},
'yaxis1': {'gridcolor': '#E1E5ED',
'showgrid': True,
'tickfont': {'color': '#4D5663'},
'title': 'Life Expectancy',
'titlefont': {'color': '#4D5663'},
'zerolinecolor': '#E1E5ED'}}}
So for some reason, plotly gives all 142 markers/bubbles just one color "rgb(255, 153, 51)". Is there a way to tell plotly to change the colors for each bubble? Perhaps this is problem on cufflinks side?
The text was updated successfully, but these errors were encountered: