Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
erdogant committed Oct 7, 2022
1 parent 9c362a5 commit 65b8a3c
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions scatterd/examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

# %%

0 comments on commit 65b8a3c

Please sign in to comment.