newsworthycharts 1.67.0__py3-none-any.whl → 1.68.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- __version__ = "1.67.0"
1
+ __version__ = "1.68.0"
2
2
 
3
3
  from .chart import Chart
4
4
  from .choroplethmap import ChoroplethMap
@@ -29,7 +29,7 @@ class CategoricalChart(Chart):
29
29
  self.show_ticks = False
30
30
 
31
31
  if len(self.data) > 1:
32
- subaxes = self._fig.subplots(1, len(self.data))
32
+ subaxes = self._fig.subplots(1, len(self.data), subplot_kw={"zorder": -1})
33
33
  patches = []
34
34
  for idx, serie in enumerate(self.data):
35
35
  if len(self.data) == 1:
@@ -52,18 +52,21 @@ class CategoricalChart(Chart):
52
52
  labels=labels if legend_placement == "inline" else None,
53
53
  startangle=90,
54
54
  colors=colors,
55
- explode=explode
55
+ explode=explode,
56
56
  )
57
57
  if idx == 0:
58
58
  patches += _pie[0]
59
- subax.axis('equal')
59
+ if len(self.data) > 1:
60
+ subax.axis('equal')
60
61
  # `labels` in pie charts are used to label the series, not the values
61
62
  if self.labels:
62
63
  subax.set_title(self.labels[idx], loc='center', y=0)
63
64
  if legend_placement == "inline":
64
65
  self.legend = False
65
66
  elif legend_placement == "legend":
66
- self.ax.legend(patches, labels, loc='best', frameon=True, fancybox=True).set_zorder(100)
67
+ _ = self.ax.legend(patches, labels, loc='best', frameon=True, fancybox=True)
68
+ _.set(zorder=20)
69
+ # self.ax.figure.subplots_adjust()
67
70
  elif legend_placement == "outside":
68
71
  _ = self.ax.legend(patches, labels, bbox_to_anchor=(1.04, 1), loc="upper left")
69
72
  _.set(zorder=20)
newsworthycharts/chart.py CHANGED
@@ -648,7 +648,7 @@ class Chart(object):
648
648
  # ticks labels
649
649
  tick_label_height
650
650
  # some padding
651
- # + 30 / self._h
651
+ + 15 / self._h
652
652
  # chart notes (if any)
653
653
  + self._note_rel_height
654
654
  # chart caption and logo (if any)
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: newsworthycharts
3
- Version: 1.67.0
3
+ Version: 1.68.0
4
4
  Summary: Matplotlib wrapper to create charts and publish them on Amazon S3
5
5
  Home-page: https://github.com/jplusplus/newsworthycharts
6
- Download-URL: https://github.com/jplusplus/newsworthycharts/archive/1.67.0.tar.gz
6
+ Download-URL: https://github.com/jplusplus/newsworthycharts/archive/1.68.0.tar.gz
7
7
  Author: Jens Finnäs and Leo Wallentin, J++ Stockholm
8
8
  Author-email: stockholm@jplusplus.org
9
9
  License: MIT
@@ -259,6 +259,12 @@ Roadmap
259
259
  Changelog
260
260
  ---------
261
261
 
262
+ - 1.68.0
263
+
264
+ - Matplotlib==3.9.3
265
+ - More padding below chart
266
+ - Fix zorder issue in labeled multiple pie charts
267
+
262
268
  - 1.67.0
263
269
 
264
270
  - Fixed label margins in pie charts
@@ -1,7 +1,7 @@
1
- newsworthycharts/__init__.py,sha256=t7zoA4QcnDRPHIEjlFDnSD3BUJrVpJjyY2dxNvpp_MQ,1160
1
+ newsworthycharts/__init__.py,sha256=mYKh_tjxmrmUeF0-2aNRB9IBWJ5VCLOtrAzxZTdITCg,1160
2
2
  newsworthycharts/bubblemap.py,sha256=nkocWmpiFgfjEuJGAsthjY5X7Q56jXWsZHUGXw4PwgE,2587
3
- newsworthycharts/categoricalchart.py,sha256=3XXBzIILkUl0721FN9j8cDK5mSjh8vK0JQGXCRu9ilo,18048
4
- newsworthycharts/chart.py,sha256=9M4LE5UUN5kMaVQ1jnCAKpACU3oZBMPPUpodad9sBT4,34390
3
+ newsworthycharts/categoricalchart.py,sha256=YL3pzq8a7U5F0MpeRIAEwCAHw1BRDyKjoaAhf-UyRDo,18179
4
+ newsworthycharts/chart.py,sha256=JFJVAU7qF_C0zlTfhZkAbtev1wdm05KIvr0LkMm5zmI,34388
5
5
  newsworthycharts/choroplethmap.py,sha256=bCLf4kcchp1C2djg5AxcOM8BdbaMj0xg7UHrZsDafhI,8013
6
6
  newsworthycharts/datawrapper.py,sha256=RRkAVTpfP4updKxUIBaSmKuBi2RUVPaBRF8HDQhlGGA,11250
7
7
  newsworthycharts/map.py,sha256=c409jEO4L8Yr780sJRC0RchR44roAlgOUDAkuk1SfRg,6057
@@ -28,8 +28,8 @@ newsworthycharts/rc/newsworthy,sha256=yOIZvYS6PG1u19VMcdtfj9vbihKQsey5IprwqK59Kg
28
28
  newsworthycharts/translations/datawrapper_regions.csv,sha256=fzZcQRX6RFMlNNP8mpgfYNdR3Y0QAlQxDXk8FXTaWWI,9214
29
29
  newsworthycharts/translations/regions.py,sha256=Nv1McQjggD4S3JRu82rDMTG3pqUVR13E5-FBpSYbm98,239
30
30
  newsworthycharts/translations/se_municipalities.csv,sha256=br_mm-IvzQtj_W55_ATREhJ97jWnCweBFlDAVY2EBxA,7098
31
- newsworthycharts-1.67.0.dist-info/LICENSE.txt,sha256=Sq6kGICrehbhC_FolNdXf0djKjTpv3YqjFCIYsxdQN4,1069
32
- newsworthycharts-1.67.0.dist-info/METADATA,sha256=drsWEzZU63lSRO05hy_VT2Mt13UGWyZNW8j_hwI43pc,31262
33
- newsworthycharts-1.67.0.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
34
- newsworthycharts-1.67.0.dist-info/top_level.txt,sha256=dn_kzIj8UgUCMsh1PHdVEQJHVGSsN7Z8YJF-8xXa8n0,17
35
- newsworthycharts-1.67.0.dist-info/RECORD,,
31
+ newsworthycharts-1.68.0.dist-info/LICENSE.txt,sha256=Sq6kGICrehbhC_FolNdXf0djKjTpv3YqjFCIYsxdQN4,1069
32
+ newsworthycharts-1.68.0.dist-info/METADATA,sha256=WhMJRk_z8Ydhb6N4UvYvzaSwchigCwWRU0nRZdblJ_8,31376
33
+ newsworthycharts-1.68.0.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
34
+ newsworthycharts-1.68.0.dist-info/top_level.txt,sha256=dn_kzIj8UgUCMsh1PHdVEQJHVGSsN7Z8YJF-8xXa8n0,17
35
+ newsworthycharts-1.68.0.dist-info/RECORD,,