Skip to content

Instantly share code, notes, and snippets.

@Nov05
Created October 20, 2019 09:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nov05/b92e14c529514fb8a810d6b2755dd776 to your computer and use it in GitHub Desktop.
Save Nov05/b92e14c529514fb8a810d6b2755dd776 to your computer and use it in GitHub Desktop.
!pip install colorlover
# Successfully installed colorlover-0.3.0
import pandas as pd
import numpy as np

import matplotlib.pyplot as plt
import seaborn as sns
import pandas_profiling
import plotly
import plotly.graph_objects as go
from sklearn.preprocessing import MinMaxScaler
import colorlover as cl
from IPython.display import HTML

pd.set_option('display.max_rows', 500)
pd.set_option('display.max_columns', 500)
import warnings
warnings.filterwarnings("ignore")
%matplotlib inline
blues = cl.scales['9']['seq']['Blues']
HTML(cl.to_html(blues))
blues500 = cl.interp(blues, 500) # Map color scale to 500 bins
HTML(cl.to_html(blues500))
# get custome colorscale "deepblues"
deepblues = []
for i in range(9):
    deepblues.append(blues500[-1-int(250/9*i)])
deepblues = deepblues[::-1]
HTML(cl.to_html(deepblues))
@Nov05
Copy link
Author

Nov05 commented Oct 20, 2019

2019-10-20 04_55_52-2019-10-19 explore ipynb - Colaboratory

2019-10-20 04_56_15-2019-10-19 explore ipynb - Colaboratory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment