Skip to content

Instantly share code, notes, and snippets.

@sbassi
Created May 6, 2020 03:25
Show Gist options
  • Save sbassi/45a94eb1526aead2bdf33c3646e1ac04 to your computer and use it in GitHub Desktop.
Save sbassi/45a94eb1526aead2bdf33c3646e1ac04 to your computer and use it in GitHub Desktop.
from bokeh.charts import Scatter, output_file, show
from pandas import DataFrame
df = DataFrame.from_csv('../../samples/fishdata.csv')
scatter = Scatter(df, x='PC1', y='PC2', color='feeds',
marker='species', title=
'Metabolic variations based on 1H NMR profiling of fishes',
xlabel='Principal Component 1: 35.8%',
ylabel='Principal Component 2: 15.1%')
scatter.legend.background_fill_alpha = 0.3
output_file('scatter.html')
show(scatter)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment