diff --git a/scatterd/examples.py b/scatterd/examples.py index df3e3ce..b19c15a 100644 --- a/scatterd/examples.py +++ b/scatterd/examples.py @@ -18,32 +18,32 @@ # %% Scatter # Change figure size -scatterd(X[:,0], X[:,1]) -scatterd(X[:,0], X[:,1], c=[1,0,0]) +fig, ax = scatterd(X[:,0], X[:,1]) +fig, ax = scatterd(X[:,0], X[:,1], c=[1,0,0]) -scatterd(X[:,0], X[:,1], fontcolor=[1,0,0]) -scatterd(X[:,0], X[:,1], fontcolor='r') -scatterd(X[:,0], X[:,1], c=[1,0,0]) +fig, ax = scatterd(X[:,0], X[:,1], fontcolor=[1,0,0]) +fig, ax = scatterd(X[:,0], X[:,1], fontcolor='r') +fig, ax = scatterd(X[:,0], X[:,1], c=[1,0,0]) -scatterd(X[:,0], X[:,1], labels=labels) -scatterd(X[:,0], X[:,1], labels=labels, gradient='#FFFFFF') -scatterd(X[:,0], X[:,1], labels=labels, cmap='Set2') +fig, ax = scatterd(X[:,0], X[:,1], labels=labels) +fig, ax = scatterd(X[:,0], X[:,1], labels=labels, gradient='#FFFFFF') +fig, ax = scatterd(X[:,0], X[:,1], labels=labels, cmap='Set2') # Color based on labels -scatterd(X[:,0], X[:,1], s=100, density=True) -scatterd(X[:,0], X[:,1], labels=labels, density=True) -scatterd(X[:,0], X[:,1], labels=labels, density=True, fontcolor=[0,0,0]) +fig, ax = scatterd(X[:,0], X[:,1], s=100, density=True) +fig, ax = scatterd(X[:,0], X[:,1], labels=labels, density=True) +fig, ax = scatterd(X[:,0], X[:,1], labels=labels, density=True, fontcolor=[0,0,0]) # Set labels -scatterd(X[:,0], X[:,1], labels=labels, s=100, norm=True, cmap='Set2', xlabel='xlabel', ylabel='ylabel', title='Title') +fig, ax = scatterd(X[:,0], X[:,1], labels=labels, s=100, norm=True, cmap='Set2', xlabel='xlabel', ylabel='ylabel', title='Title') # Change sizes s=np.random.randint(10, 500,len(labels)) -scatterd(X[:,0], X[:,1], labels=labels, s=s, cmap='Set2', xlabel='xlabel', ylabel='ylabel', title='Title', fontsize=25, density=True) +fig, ax = scatterd(X[:,0], X[:,1], labels=labels, s=s, cmap='Set2', xlabel='xlabel', ylabel='ylabel', title='Title', fontsize=25, density=True) -scatterd(X[:,0], X[:,1], labels=labels, s=s, cmap='Set2', xlabel='xlabel', ylabel='ylabel', title='Title', fontsize=25, density=True, fontcolor=[0,0,0]) +fig, ax = scatterd(X[:,0], X[:,1], labels=labels, s=s, cmap='Set2', xlabel='xlabel', ylabel='ylabel', title='Title', fontsize=25, density=True, fontcolor=[0,0,0]) args_density = {'fill': True, 'thresh': 0, 'levels': 100, 'cmap':"mako", 'cbar': False, 'shade':True} -scatterd(X[:,0], X[:,1], labels=labels, s=s, cmap='Set2', xlabel='xlabel', ylabel='ylabel', title='Title', fontsize=25, density=True, fontcolor=[0,0,0], axiscolor=None, args_density=args_density) +fig, ax = scatterd(X[:,0], X[:,1], labels=labels, s=s, cmap='Set2', xlabel='xlabel', ylabel='ylabel', title='Title', fontsize=25, density=True, fontcolor=[0,0,0], axiscolor=None, args_density=args_density) # %% \ No newline at end of file