Skip to content

Commit 6950fc5

Browse files
authored
Update README.md
1 parent 2ccaa96 commit 6950fc5

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,14 @@ import numpy as np
5050
from chroptiks.plotting_utils import hist2d
5151

5252
x = np.linspace(-1,1, 100000)+np.random.normal(0,.1, size=100000)
53-
54-
y = x**(-3)+np.random.normal(0, 50, size=100000)
53+
y = x**(3)+np.random.normal(0, 0.3, size=100000)
54+
z = np.random.normal(size=100000)
5555

5656
hist2d.plot(x,y,nx=200,ny=200)
5757

58-
z = np.random.normal(size=100000)
59-
6058
hist2d.plot(x,y,nx=40, ny=40, ccode = z, ccodename='Z', xlabel='X', ylabel='Y')
6159

62-
hist2d.plot(y,z,nx=200,ny=200,bin_y=True, size_y_bin=0.1, xlabel='Y', ylabel='Z', percentiles=False)
60+
hist2d.plot(x,y,nx=200,ny=200,bin_y=True, size_y_bin=0.1, xlabel='X', ylabel='Y', percentiles=False)
6361

6462
from chroptiks.plotting_utils import hist1d
6563

@@ -77,11 +75,11 @@ from chroptiks.plotting_utils import scat
7775
scat.plot(x,z)
7876

7977
#scat with color-code
80-
scat.plot(x,y, color=z, vmin=-0.5, vmax=0.5)
81-
78+
scat.plot(x,y, ccode=z, color=None, edgecolor=None, vmin=-0.5, vmax=0.5)
79+
#note if you use ccode to color the points, you must set color to None, and I would advise you to set edgecolor to None as well or else each will have outlines.
8280

8381
#scat with y-binning
84-
scat.plot(x,z, bin_y=True, size_y_bin=0.1, percentiles=True, xlabel='X', ylabel='Z')
82+
scat.plot(x, y, bin_y=True, size_y_bin=0.1, percentiles=True, xlabel='X', ylabel='Z', aspect='auto')
8583

8684

8785

0 commit comments

Comments
 (0)