Skip to content

Instantly share code, notes, and snippets.

View MatthieuLoustaunau's full-sized avatar

MatthieuLoustaunau

View GitHub Profile
@MatthieuLoustaunau
MatthieuLoustaunau / gist:5e3a6929573c4d600d0a58119bc0bde9
Created October 8, 2019 09:46
legend outside plot matplotlib
import matplotlib.pyplot as plt
import numpy as np
x = np.arange(10)
fig = plt.figure()
ax = plt.subplot(111)
for i in xrange(5):
ax.plot(x, i * x, label='$y = %ix$'%i)
import numpy as np
import pandas as pd
from bokeh.models import Circle, ColumnDataSource, Range1d, HoverTool, CustomJS
from bokeh.transform import factor_cmap
from bokeh.plotting import figure, show, output_file
output_file("hover_linked_samples.html")
raw_array=np.random.rand(80,2)