newsworthycharts 1.65.2__tar.gz → 1.65.3__tar.gz
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-1.65.2/newsworthycharts.egg-info → newsworthycharts-1.65.3}/PKG-INFO +7 -2
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/README.rst +5 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/__init__.py +1 -1
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/chart.py +12 -9
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3/newsworthycharts.egg-info}/PKG-INFO +7 -2
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/LICENSE.txt +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/MANIFEST.in +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/bubblemap.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/categoricalchart.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/choroplethmap.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/custom/__init__.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/custom/climate_cars.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/datawrapper.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/lib/__init__.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/lib/color_fn.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/lib/colors.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/lib/datalist.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/lib/formatter.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/lib/geography.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/lib/locator.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/lib/mimetypes.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/lib/utils.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/map.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/maps/se-4.gpkg +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/maps/se-7.gpkg +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/rangeplot.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/rc/newsworthy +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/scatterplot.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/seasonalchart.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/serialchart.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/storage.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/stripechart.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/translations/datawrapper_regions.csv +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/translations/regions.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/translations/se_municipalities.csv +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts.egg-info/SOURCES.txt +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts.egg-info/dependency_links.txt +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts.egg-info/not-zip-safe +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts.egg-info/requires.txt +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts.egg-info/top_level.txt +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/setup.cfg +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/setup.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/test/test_categorical_chart.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/test/test_choropleth_maps.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/test/test_custom_climate_cars.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/test/test_data_list.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/test/test_datawrapper.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/test/test_main.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/test/test_rangeplot.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/test/test_scatterplot.py +0 -0
- {newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/test/test_serial_chart.py +0 -0
@@ -1,9 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: newsworthycharts
|
3
|
-
Version: 1.65.
|
3
|
+
Version: 1.65.3
|
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.3.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,11 @@ Roadmap
|
|
259
259
|
Changelog
|
260
260
|
---------
|
261
261
|
|
262
|
+
- 1.65.3
|
263
|
+
|
264
|
+
- Dynamic title font size adjustments
|
265
|
+
- Further title margin adjustments
|
266
|
+
|
262
267
|
- 1.65.2
|
263
268
|
|
264
269
|
- Title margin adjustments
|
@@ -91,12 +91,6 @@ class Chart(object):
|
|
91
91
|
self._language = standardize_tag(language)
|
92
92
|
self._locale = Locale.parse(self._language.replace("-", "_"))
|
93
93
|
|
94
|
-
# Dynamic typography
|
95
|
-
self._title_font = FontProperties()
|
96
|
-
self._title_font.set_family(self._nwc_style["title_font"])
|
97
|
-
self._title_font.set_size(self._style["figure.titlesize"])
|
98
|
-
self._title_font.set_weight(self._style["figure.titleweight"])
|
99
|
-
|
100
94
|
self._fig = Figure(layout="tight")
|
101
95
|
FigureCanvas(self._fig)
|
102
96
|
self.ax = self._fig.add_subplot(111)
|
@@ -112,6 +106,15 @@ class Chart(object):
|
|
112
106
|
if height:
|
113
107
|
self._h = int(height)
|
114
108
|
|
109
|
+
# Dynamic typography
|
110
|
+
self._title_font = FontProperties()
|
111
|
+
# scale up slightly < 600px, scale down slightly > 600px
|
112
|
+
import math
|
113
|
+
adjusted_fontsize = math.log(self._h, 600)
|
114
|
+
self._title_font.set_family(self._nwc_style["title_font"])
|
115
|
+
self._title_font.set_size(int(adjusted_fontsize * self._style["figure.titlesize"]))
|
116
|
+
self._title_font.set_weight(self._style["figure.titleweight"])
|
117
|
+
|
115
118
|
# Chart elements. Made available for fitting.
|
116
119
|
self._title_elem = None
|
117
120
|
self._subtitle_elem = None
|
@@ -844,8 +847,7 @@ class Chart(object):
|
|
844
847
|
if self._title_elem:
|
845
848
|
rel_height += self._text_rel_height(self._title_elem)
|
846
849
|
# Adds a fixed margin below
|
847
|
-
rel_height += 0.
|
848
|
-
# rel_height += 30 / self._h
|
850
|
+
rel_height += 0.008
|
849
851
|
return rel_height
|
850
852
|
|
851
853
|
@property
|
@@ -854,7 +856,8 @@ class Chart(object):
|
|
854
856
|
if self._subtitle_elem:
|
855
857
|
rel_height += self._text_rel_height(self._subtitle_elem)
|
856
858
|
# Adds a fixed margin below
|
857
|
-
rel_height +=
|
859
|
+
rel_height += 0.008
|
860
|
+
# rel_height += 15 / self._h
|
858
861
|
return rel_height
|
859
862
|
|
860
863
|
@property
|
@@ -1,9 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: newsworthycharts
|
3
|
-
Version: 1.65.
|
3
|
+
Version: 1.65.3
|
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.3.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,11 @@ Roadmap
|
|
259
259
|
Changelog
|
260
260
|
---------
|
261
261
|
|
262
|
+
- 1.65.3
|
263
|
+
|
264
|
+
- Dynamic title font size adjustments
|
265
|
+
- Further title margin adjustments
|
266
|
+
|
262
267
|
- 1.65.2
|
263
268
|
|
264
269
|
- Title margin adjustments
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts/translations/regions.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{newsworthycharts-1.65.2 → newsworthycharts-1.65.3}/newsworthycharts.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|