Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
5b09d89
Try to pop vmin and vmax out of norm_kw
lukelbd Sep 2, 2019
a3ebbb1
Respect vmin and vmax as hard minimum/maximum
lukelbd Sep 2, 2019
ba2ce6f
Merge branch 'master' into panels-change-gridspec
lukelbd Sep 2, 2019
bad8024
Remove PanelAxes, and remove 'panels' args from subplots()! Colorbar …
lukelbd Sep 3, 2019
aa4cccf
On-the-fly figure colorbars and legends!
lukelbd Sep 3, 2019
c264999
Return axes_grid of panels, fix _panels_kwargs bug
lukelbd Sep 3, 2019
088a537
Fix axes_grid docstring
lukelbd Sep 3, 2019
bf87d3a
Minor
lukelbd Sep 3, 2019
cfe7e66
axes_grid docstring
lukelbd Sep 3, 2019
3205230
Zoom attribute change
lukelbd Sep 3, 2019
00bd9ff
Auto legend cleanup
lukelbd Sep 3, 2019
25934db
Comments
lukelbd Sep 3, 2019
73dd02c
Better 'span' fig panel aliases
lukelbd Sep 3, 2019
9254346
Add AAAS to journals; fix bug in pulling their dims
Sep 4, 2019
32c4cc8
Move journal dictionary to top; add testing for journals
Sep 4, 2019
7b6e4e0
Misc bugfixes and cleanup
lukelbd Sep 5, 2019
b8df9e1
Panels bugfix
lukelbd Sep 5, 2019
c67c3f8
Remove print statement
lukelbd Sep 5, 2019
5643867
Update documentation to reflect new colorbars, legends usage, add ins…
lukelbd Sep 5, 2019
4a43155
Merge pull request #31 from lukelbd/panels-change-gridspec
lukelbd Sep 5, 2019
acc905c
Remove duplicate 'Plotting wrappers' docs
lukelbd Sep 5, 2019
c2ae600
All caps constants
lukelbd Sep 6, 2019
f9c6eda
Name change fix
lukelbd Sep 6, 2019
c880ef1
Figure documentation
lukelbd Sep 6, 2019
7a611b5
_subplots_geometry cleanup
lukelbd Sep 6, 2019
43943a7
Merge pull request #30 from bradyrx/add_aaas_journals
lukelbd Sep 6, 2019
ddcc5fe
Repair dead links in wrappers.py
lukelbd Sep 6, 2019
bb3f21a
Merge branch 'master' of https://github.com/lukelbd/proplot
lukelbd Sep 6, 2019
039aea3
Demo stacked figure panels
lukelbd Sep 6, 2019
8804efc
_reassign_title bugfix, minor docs changes
lukelbd Sep 9, 2019
2b78889
Preliminary add_subplot changes
lukelbd Sep 9, 2019
695318b
Merge from master
lukelbd Sep 14, 2019
513d3e0
Fix import error
lukelbd Sep 14, 2019
ff760aa
Merge and fix docs conflicts
lukelbd Sep 18, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Comments
  • Loading branch information
lukelbd committed Sep 3, 2019
commit 25934db4e01d7cca697ef89240f9850aa34fb079
17 changes: 7 additions & 10 deletions proplot/subplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,16 +740,14 @@ def __init__(self,
@_counter
def _add_axes_panel(self, ax, side, filled=False, **kwargs):
"""Hidden method that powers `~proplot.axes.panel_axes`."""
# Redirect to main axes, e.g. if want to draw outer colorbar or legend
# from data plotted in a panel or inset axes
ax = ax._panel_parent or ax
# Interpret args
# NOTE: Axis sharing not implemented for figure panels, 99% of the
# time this is just used as construct for adding global colorbars and
# legends, really not worth implementing axis sharing
s = side[0]
if s not in 'lrbt':
raise ValueError(f'Invalid side {side!r}.')
ax = ax._panel_parent or ax # redirect to main axes
side = _side_translate[s]
share, width, space, space_orig = _panels_kwargs(s,
filled=filled, figure=False, **kwargs)
Expand Down Expand Up @@ -793,7 +791,7 @@ def _add_axes_panel(self, ax, side, filled=False, **kwargs):
def _add_figure_panel(self, side, span=None, **kwargs):
"""Adds figure panels. Also modifies the panel attribute stored
on the figure to include these panels."""
# Get default panel args
# Interpret args
s = side[0]
if s not in 'lrbt':
raise ValueError(f'Invalid side {side!r}.')
Expand All @@ -809,6 +807,7 @@ def _add_figure_panel(self, side, span=None, **kwargs):
panels, nacross = subplots_kw['wpanels'], subplots_kw['nrows']
array = getattr(self, '_' + s + 'array')
npanels, nalong = array.shape

# Check span array
span = _notNone(span, (1, nalong))
if not np.iterable(span) or len(span)==1:
Expand All @@ -819,11 +818,10 @@ def _add_figure_panel(self, side, span=None, **kwargs):
raise ValueError(f'Invalid coordinates in span={span!r}. Coordinates must satisfy 1 <= c <= {nalong}.')
start, stop = span[0] - 1, span[1] # zero-indexed

# See if there is room for panel on the figure
# See if there is room for panel in current figure panels
# The 'array' is an array of boolean values, where each row corresponds
# to another figure panel, moving toward the outside, and
# We use add to panels toward the outside by appending rows to boolean
# arrays indicating which main axes rows and columns are occupied
# to another figure panel, moving toward the outside, and boolean
# True indicates the slot has been filled
iratio = (-1 if s in 'lt' else nacross) # default vals
for i in range(npanels):
if not any(array[i,start:stop]):
Expand All @@ -839,8 +837,7 @@ def _add_figure_panel(self, side, span=None, **kwargs):
# npanels=2, i=1 --> iratio=nacross-1
iratio = nacross - (npanels - i)
break
# Add to array, since we are adding another panel
if iratio in (-1, nacross):
if iratio in (-1, nacross): # add to array
iarray = np.zeros((1, nalong), dtype=bool)
iarray[0,start:stop] = True
array = np.concatenate((array, iarray), axis=0)
Expand Down