Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

plotly graph object colorscale

import plotly.graph_objects as go

fig = go.Figure()

# Create list from 0 to 39 to use as x, y, and color
values = list(range(40))

fig.add_trace(go.Scatter(
    x=values,
    y=values,
    marker=dict(
        size=16,
        cmax=39,
        cmin=0,
        color=values,
        colorbar=dict(
            title="Colorbar"
        ),
        colorscale="Viridis"
    ),
    mode="markers"))

fig.show()
Comment

PREVIOUS NEXT
Code Example
Python :: iterate over dictionary django 
Python :: pandas categorical to numeric 
Python :: qtablewidget clear python 
Python :: flatten columns after pivot pandas 
Python :: how to define function in python 
Python :: cross join pandas 
Python :: relative path django 
Python :: how to execute bash commands in python script 
Python :: how to get time in python 
Python :: urllib 
Python :: pandas select first within groupby 
Python :: decode multipart/form-data python 
Python :: python bit shift by 3 
Python :: pandas change column dtype 
Python :: how to change the values of a column in numpy array 
Python :: flask debugtoolbar 
Python :: check type of django messages 
Python :: python getattr 
Python :: python mettre en minuscule 
Python :: create pytorch zeros 
Python :: python print trailing zeros 
Python :: exclude last value of an array python 
Python :: how to install python libraries using pip 
Python :: c++ vs python 
Python :: opencv google colab 
Python :: python make file executable 
Python :: intellij python 
Python :: variable in python 
Python :: python selenium click element 
Python :: pandas cumulative mean 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =