|
11 | 11 |
|
12 | 12 | class DotPlot(object): |
13 | 13 | DEFAULT_ITEM_HEIGHT = 0.3 |
14 | | - DEFAULT_ITEM_WIDTH = 0.35 |
15 | | - DEFAULT_LEGENDS_WIDTH = .5 |
| 14 | + DEFAULT_ITEM_WIDTH = 0.3 |
| 15 | + DEFAULT_LEGENDS_WIDTH = .45 |
16 | 16 | MIN_FIGURE_HEIGHT = 3 |
17 | 17 |
|
18 | 18 | def __init__(self, df_size: pd.DataFrame, |
@@ -42,11 +42,11 @@ def __get_figure(self): |
42 | 42 | figure_width = mainplot_width + self.DEFAULT_LEGENDS_WIDTH |
43 | 43 | plt.style.use('seaborn-white') |
44 | 44 | fig = plt.figure(figsize=(figure_width, figure_height)) |
45 | | - gs = gridspec.GridSpec(nrows=2, ncols=2, wspace=0.15, hspace=0.15, |
| 45 | + gs = gridspec.GridSpec(nrows=3, ncols=2, wspace=0.15, hspace=0.15, |
46 | 46 | width_ratios=[mainplot_width, self.DEFAULT_LEGENDS_WIDTH]) |
47 | 47 | ax = fig.add_subplot(gs[:, 0]) |
48 | | - ax_cbar = fig.add_subplot(gs[1, 1]) |
49 | | - ax_legend = fig.add_subplot(gs[0, 1]) |
| 48 | + ax_cbar = fig.add_subplot(gs[2, 1]) |
| 49 | + ax_legend = fig.add_subplot(gs[0:2, 1]) |
50 | 50 | return ax, ax_cbar, ax_legend, fig |
51 | 51 |
|
52 | 52 | @classmethod |
|
0 commit comments