Skip to content

Commit 23d4cc9

Browse files
committed
Fix issues with show_(cmaps|cycles) due to padding fix (#221)
1 parent 3b1cbaf commit 23d4cc9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

proplot/demos.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,11 @@ def _draw_bars(
244244
cmapdict.pop(cat)
245245

246246
# Draw figure
247+
# Allocate two colorbar widths for each title of sections
247248
naxs = 2 * len(cmapdict) + sum(map(len, cmapdict.values()))
248249
fig, axs = ui.subplots(
249250
nrows=naxs, refwidth=length, refheight=width,
250-
share=0, hspace=0.03,
251+
share=0, hspace='2pt', top='-1em',
251252
)
252253
iax = -1
253254
nheads = nbars = 0 # for deciding which axes to plot in
@@ -327,8 +328,8 @@ def show_channels(
327328
array += [np.array([4, 4, 5, 5, 6, 6]) + 2 * int(saturation)]
328329
labels += ('Red', 'Green', 'Blue')
329330
fig, axs = ui.subplots(
330-
array=array, span=False, share=1,
331-
refwidth=refwidth, innerpad='1em',
331+
array=array, refwidth=refwidth, wratios=(1.5, 1, 1, 1, 1, 1.5),
332+
share=1, span=False, innerpad='1em',
332333
)
333334
# Iterate through colormaps
334335
mc = ms = mp = 0

0 commit comments

Comments
 (0)