import numpy as np import matplotlib.pyplot as plt import seaborn as sns import sklearn.datasets as data % matplotlib inline sns . set_context ( 'poster' ) sns . set_style ( 'white' ) sns . set_color_codes () plot_kwds = { 'alpha' : 0.5 , 's' : 80 , 'linewidths' : 0 }
import numpy as np import matplotlib.pyplot as plt import seaborn as sns import sklearn.datasets as data % matplotlib inline sns . set_context ( 'poster' ) sns . set_style ( 'white' ) sns . set_color_codes () plot_kwds = { 'alpha' : 0.5 , 's' : 80 , 'linewidths' : 0 }
moons , _ = data . make_moons ( n_samples = 50 , noise = 0.05 ) blobs , _ = data . make_blobs ( n_samples = 50 , centers = [( - 0.75 , 2.25 ), ( 1.0 , 2.0 )], cluster_std = 0.25 ) test_data = np . vstack ([ moons , blobs ]) plt . scatter ( test_data . T [ 0 ], test_data . T [ 1 ], color = 'b' , ** plot_kwds )
moons , _ = data . make_moons ( n_samples = 50 , noise = 0.05 ) blobs , _ = data . make_blobs ( n_samples = 50 , centers = [( - 0.75 , 2.25 ), ( 1.0 , 2.0 )], cluster_std = 0.25 ) test_data = np . vstack ([ moons , blobs ]) plt . scatter ( test_data . T [ 0 ], test_data . T [ 1 ], color = 'b' , ** plot_kwds )