8000 Normalize intensity values in [0, 1] and adjust x-ticks · matplotlib/matplotlib@dfc9cca · GitHub
[go: up one dir, main page]

Skip to content

Commit dfc9cca

Browse files
committed
Normalize intensity values in [0, 1] and adjust x-ticks
1 pa
8000
rent 38d92b5 commit dfc9cca

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

examples/pylab_examples/mri_with_eeg.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@
2929
ax1 = fig.add_subplot(2, 2, 2)
3030
im = np.ravel(im)
3131
im = im[np.nonzero(im)] # Ignore the background
32-
im = im / (2**15) # Normalize
32+
im = im / (2**16 - 1) # Normalize
3333
ax1.hist(im, bins=100)
34-
ax1.xaxis.set_major_locator(MultipleLocator(0.5))
34+
ax1.xaxis.set_major_locator(MultipleLocator(0.4))
35+
ax1.minorticks_on()
3536
ax1.set_yticks([])
36-
ax1.set_xlabel('Intensity')
37+
ax1.set_xlabel('Intensity (a.u.)')
3738
ax1.set_ylabel('MRI density')
3839

3940
# Load the EEG data

0 commit comments

Comments
 (0)
0