Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Keitel
gridcorner
Commits
b1276f51
Commit
b1276f51
authored
Oct 30, 2017
by
Gregory Ashton
Browse files
Minor aesthetic changes
parent
bb07e608
Changes
1
Hide whitespace changes
Inline
Side-by-side
projection_matrix/projection_matrix.py
View file @
b1276f51
...
@@ -48,7 +48,7 @@ def idx_array_slice(D, axis, slice_idx):
...
@@ -48,7 +48,7 @@ def idx_array_slice(D, axis, slice_idx):
def
projection_matrix
(
D
,
xyz
,
labels
=
None
,
projection
=
'max_slice'
,
def
projection_matrix
(
D
,
xyz
,
labels
=
None
,
projection
=
'max_slice'
,
max_n_ticks
=
4
,
factor
=
3
,
**
kwargs
):
max_n_ticks
=
4
,
factor
=
3
,
whspace
=
0.05
,
**
kwargs
):
""" Generate a projection matrix plot
""" Generate a projection matrix plot
Parameters
Parameters
...
@@ -80,9 +80,8 @@ def projection_matrix(D, xyz, labels=None, projection='max_slice',
...
@@ -80,9 +80,8 @@ def projection_matrix(D, xyz, labels=None, projection='max_slice',
"""
"""
ndim
=
D
.
ndim
ndim
=
D
.
ndim
lbdim
=
0.
5
*
factor
# size of left/bottom margin
lbdim
=
0.
4
*
factor
# size of left/bottom margin
trdim
=
0.2
*
factor
# size of top/right margin
trdim
=
0.2
*
factor
# size of top/right margin
whspace
=
0.05
# w/hspace size
plotdim
=
factor
*
ndim
+
factor
*
(
ndim
-
1.
)
*
whspace
plotdim
=
factor
*
ndim
+
factor
*
(
ndim
-
1.
)
*
whspace
dim
=
lbdim
+
plotdim
+
trdim
dim
=
lbdim
+
plotdim
+
trdim
...
@@ -99,7 +98,7 @@ def projection_matrix(D, xyz, labels=None, projection='max_slice',
...
@@ -99,7 +98,7 @@ def projection_matrix(D, xyz, labels=None, projection='max_slice',
# Format the figure.
# Format the figure.
lb
=
lbdim
/
dim
lb
=
lbdim
/
dim
tr
=
(
lbdim
+
plotdim
)
/
dim
tr
=
(
lbdim
+
plotdim
)
/
dim
fig
.
subplots_adjust
(
left
=
lb
,
bottom
=
lb
,
right
=
tr
,
top
=
tr
,
fig
.
subplots_adjust
(
left
=
lb
,
bottom
=
lb
,
right
=
0.98
*
tr
,
top
=
tr
,
wspace
=
whspace
,
hspace
=
whspace
)
wspace
=
whspace
,
hspace
=
whspace
)
for
i
in
range
(
ndim
):
for
i
in
range
(
ndim
):
projection_1D
(
projection_1D
(
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment