newsworthycharts 1.65.0__py3-none-any.whl → 1.65.2__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.
- newsworthycharts/__init__.py +1 -1
- newsworthycharts/categoricalchart.py +2 -2
- newsworthycharts/chart.py +7 -4
- newsworthycharts/rc/newsworthy +1 -2
- {newsworthycharts-1.65.0.dist-info → newsworthycharts-1.65.2.dist-info}/METADATA +10 -2
- {newsworthycharts-1.65.0.dist-info → newsworthycharts-1.65.2.dist-info}/RECORD +9 -9
- {newsworthycharts-1.65.0.dist-info → newsworthycharts-1.65.2.dist-info}/LICENSE.txt +0 -0
- {newsworthycharts-1.65.0.dist-info → newsworthycharts-1.65.2.dist-info}/WHEEL +0 -0
- {newsworthycharts-1.65.0.dist-info → newsworthycharts-1.65.2.dist-info}/top_level.txt +0 -0
newsworthycharts/__init__.py
CHANGED
@@ -292,13 +292,13 @@ class ProgressChart(CategoricalChart):
|
|
292
292
|
def __init__(self, *args, **kwargs):
|
293
293
|
self.target = None
|
294
294
|
self.target_label = None
|
295
|
-
self.legend = False
|
296
295
|
|
297
296
|
# should value labels be rendered?
|
298
297
|
self.value_labels = None # "progress"|"remaining"
|
299
298
|
|
300
299
|
super().__init__(*args, **kwargs)
|
301
300
|
self.stacked = True
|
301
|
+
self.legend = False
|
302
302
|
|
303
303
|
def _add_data(self):
|
304
304
|
if self.target is None:
|
@@ -339,7 +339,7 @@ class ProgressChart(CategoricalChart):
|
|
339
339
|
|
340
340
|
# rect.set_linewidth(1)
|
341
341
|
# rect.set_edgecolor(color_progress)
|
342
|
-
|
342
|
+
|
343
343
|
# LABELING: Target
|
344
344
|
if self.target_label:
|
345
345
|
offset = 25
|
newsworthycharts/chart.py
CHANGED
@@ -633,8 +633,10 @@ class Chart(object):
|
|
633
633
|
|
634
634
|
# Fit area below chart
|
635
635
|
try:
|
636
|
-
tick_label_height = max(
|
637
|
-
|
636
|
+
tick_label_height = max(
|
637
|
+
[self._text_rel_height(lbl)
|
638
|
+
for lbl in self.ax.get_xticklabels()]
|
639
|
+
)
|
638
640
|
except ValueError:
|
639
641
|
# handle charts without ticks
|
640
642
|
tick_label_height = 0
|
@@ -643,7 +645,7 @@ class Chart(object):
|
|
643
645
|
# ticks labels
|
644
646
|
tick_label_height
|
645
647
|
# some padding
|
646
|
-
+ 30 / self._h
|
648
|
+
# + 30 / self._h
|
647
649
|
# chart notes (if any)
|
648
650
|
+ self._note_rel_height
|
649
651
|
# chart caption and logo (if any)
|
@@ -842,7 +844,8 @@ class Chart(object):
|
|
842
844
|
if self._title_elem:
|
843
845
|
rel_height += self._text_rel_height(self._title_elem)
|
844
846
|
# Adds a fixed margin below
|
845
|
-
rel_height +=
|
847
|
+
rel_height += 0.01
|
848
|
+
# rel_height += 30 / self._h
|
846
849
|
return rel_height
|
847
850
|
|
848
851
|
@property
|
newsworthycharts/rc/newsworthy
CHANGED
@@ -6,7 +6,7 @@ backend : Agg
|
|
6
6
|
figure.dpi : 150
|
7
7
|
|
8
8
|
# Margins
|
9
|
-
savefig.pad_inches
|
9
|
+
savefig.pad_inches : 0.2
|
10
10
|
legend.borderaxespad : 0.7 # the margin between legend box and axes
|
11
11
|
|
12
12
|
# Axes and ticks
|
@@ -65,4 +65,3 @@ lines.markersize : 8
|
|
65
65
|
# Fill between lines
|
66
66
|
#! fill_between_color : F7F4F4
|
67
67
|
#! fill_between_alpha : 0.5
|
68
|
-
|
@@ -1,9 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: newsworthycharts
|
3
|
-
Version: 1.65.
|
3
|
+
Version: 1.65.2
|
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.65.
|
6
|
+
Download-URL: https://github.com/jplusplus/newsworthycharts/archive/1.65.2.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,14 @@ Roadmap
|
|
259
259
|
Changelog
|
260
260
|
---------
|
261
261
|
|
262
|
+
- 1.65.2
|
263
|
+
|
264
|
+
- Title margin adjustments
|
265
|
+
|
266
|
+
- 1.65.1
|
267
|
+
|
268
|
+
- Fixed legend bug in ProgressChart
|
269
|
+
|
262
270
|
- 1.65.0
|
263
271
|
|
264
272
|
- Stacked data with percentages summing to very close to 100 % will now be treated as 100 %, assuming rounding error artifacts
|
@@ -1,7 +1,7 @@
|
|
1
|
-
newsworthycharts/__init__.py,sha256=
|
1
|
+
newsworthycharts/__init__.py,sha256=Ls4rdrPaC7IzvGI5F9AK1YPkSdJwvSZihYFsMKjwCDg,1160
|
2
2
|
newsworthycharts/bubblemap.py,sha256=nkocWmpiFgfjEuJGAsthjY5X7Q56jXWsZHUGXw4PwgE,2587
|
3
|
-
newsworthycharts/categoricalchart.py,sha256=
|
4
|
-
newsworthycharts/chart.py,sha256=
|
3
|
+
newsworthycharts/categoricalchart.py,sha256=wLrS8H69Sx3FT-0r3w3ZOIC83IHb8HCHD0zTsXiIiNA,15737
|
4
|
+
newsworthycharts/chart.py,sha256=pAWvd0_-f6NsOYnBZDNl3w5jmzxZSnD-S0S2EuqAMaU,34219
|
5
5
|
newsworthycharts/choroplethmap.py,sha256=bCLf4kcchp1C2djg5AxcOM8BdbaMj0xg7UHrZsDafhI,8013
|
6
6
|
newsworthycharts/datawrapper.py,sha256=RRkAVTpfP4updKxUIBaSmKuBi2RUVPaBRF8HDQhlGGA,11250
|
7
7
|
newsworthycharts/map.py,sha256=c409jEO4L8Yr780sJRC0RchR44roAlgOUDAkuk1SfRg,6057
|
@@ -24,12 +24,12 @@ newsworthycharts/lib/mimetypes.py,sha256=bL9HtVWbn2Of39LcBt4u4yelkr4bGZiyebq3OfL
|
|
24
24
|
newsworthycharts/lib/utils.py,sha256=l4SUVB-8lnm3XHqHNo5KgZuZNv_VaFnrH76hrZmDq1s,7231
|
25
25
|
newsworthycharts/maps/se-4.gpkg,sha256=oWw5j7FPVpI0ig67jNDim8qSn5SG8rcHp0014-uTKZM,290816
|
26
26
|
newsworthycharts/maps/se-7.gpkg,sha256=Vmvqudq_ZtgV0sd6TY6kuk7vzqmYZCJmaxtsJ87q2a8,331776
|
27
|
-
newsworthycharts/rc/newsworthy,sha256=
|
27
|
+
newsworthycharts/rc/newsworthy,sha256=yOIZvYS6PG1u19VMcdtfj9vbihKQsey5IprwqK59KgE,1589
|
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.65.
|
32
|
-
newsworthycharts-1.65.
|
33
|
-
newsworthycharts-1.65.
|
34
|
-
newsworthycharts-1.65.
|
35
|
-
newsworthycharts-1.65.
|
31
|
+
newsworthycharts-1.65.2.dist-info/LICENSE.txt,sha256=Sq6kGICrehbhC_FolNdXf0djKjTpv3YqjFCIYsxdQN4,1069
|
32
|
+
newsworthycharts-1.65.2.dist-info/METADATA,sha256=CUcPOQZOIhoB0qcm0_-LhhPmGeIaLfdwT31PNxwvErw,30762
|
33
|
+
newsworthycharts-1.65.2.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
|
34
|
+
newsworthycharts-1.65.2.dist-info/top_level.txt,sha256=dn_kzIj8UgUCMsh1PHdVEQJHVGSsN7Z8YJF-8xXa8n0,17
|
35
|
+
newsworthycharts-1.65.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|