newsworthycharts 1.70.0__tar.gz → 1.70.2__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.70.0/newsworthycharts.egg-info → newsworthycharts-1.70.2}/PKG-INFO +13 -3
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/README.rst +11 -1
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/__init__.py +1 -1
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/chart.py +16 -7
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2/newsworthycharts.egg-info}/PKG-INFO +13 -3
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/LICENSE.txt +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/MANIFEST.in +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/bubblemap.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/categoricalchart.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/choroplethmap.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/custom/__init__.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/custom/climate_cars.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/datawrapper.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/lib/__init__.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/lib/color_fn.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/lib/colors.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/lib/datalist.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/lib/formatter.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/lib/geography.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/lib/locator.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/lib/mimetypes.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/lib/utils.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/map.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/maps/se-4.gpkg +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/maps/se-7.gpkg +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/rangeplot.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/rc/newsworthy +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/scatterplot.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/seasonalchart.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/serialchart.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/storage.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/stripechart.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/translations/datawrapper_regions.csv +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/translations/regions.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts/translations/se_municipalities.csv +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts.egg-info/SOURCES.txt +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts.egg-info/dependency_links.txt +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts.egg-info/not-zip-safe +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts.egg-info/requires.txt +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/newsworthycharts.egg-info/top_level.txt +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/setup.cfg +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/setup.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/test/test_categorical_chart.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/test/test_choropleth_maps.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/test/test_custom_climate_cars.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/test/test_data_list.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/test/test_datawrapper.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/test/test_main.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/test/test_rangeplot.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/test/test_scatterplot.py +0 -0
- {newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/test/test_serial_chart.py +0 -0
@@ -1,9 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: newsworthycharts
|
3
|
-
Version: 1.70.
|
3
|
+
Version: 1.70.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.70.
|
6
|
+
Download-URL: https://github.com/jplusplus/newsworthycharts/archive/1.70.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
|
@@ -167,7 +167,7 @@ These settings are available for all chart types:
|
|
167
167
|
- value_labels = False # Print out values at points on line?
|
168
168
|
- highlighted_x_ranges = [] # List of tuples with start and end of highlighted areas
|
169
169
|
- x_range_labels = [] # List of labels for highlighted areas
|
170
|
-
- label_placement = "legend" # legend|inline|outside|line
|
170
|
+
- label_placement = "legend" # legend|inline|outside|line|none
|
171
171
|
- color_labels = None # A dictionary of label/color, to override style colors
|
172
172
|
|
173
173
|
**SeasonalChart**
|
@@ -186,6 +186,7 @@ _ Inherits from SerialChart _
|
|
186
186
|
- legend = True
|
187
187
|
- stacked = False
|
188
188
|
- type = "bars" # [bars|pie]
|
189
|
+
- label_placement = "legend" # legend|outside|none
|
189
190
|
|
190
191
|
**CategoricalChartWithReference**
|
191
192
|
|
@@ -260,6 +261,15 @@ Roadmap
|
|
260
261
|
Changelog
|
261
262
|
---------
|
262
263
|
|
264
|
+
- 1.70.2
|
265
|
+
|
266
|
+
- Fix edge case bug in y axis cutoff logic
|
267
|
+
|
268
|
+
- 1.70.1
|
269
|
+
|
270
|
+
- Make sure y axis is cut at 100 % unless we are really, really certain it should be higher
|
271
|
+
- Revert some more padding changes from 1.65.2 and 1.65.3
|
272
|
+
|
263
273
|
- 1.70.0
|
264
274
|
|
265
275
|
- Pillow==11.1.0 (possibly faster png rendering)
|
@@ -141,7 +141,7 @@ These settings are available for all chart types:
|
|
141
141
|
- value_labels = False # Print out values at points on line?
|
142
142
|
- highlighted_x_ranges = [] # List of tuples with start and end of highlighted areas
|
143
143
|
- x_range_labels = [] # List of labels for highlighted areas
|
144
|
-
- label_placement = "legend" # legend|inline|outside|line
|
144
|
+
- label_placement = "legend" # legend|inline|outside|line|none
|
145
145
|
- color_labels = None # A dictionary of label/color, to override style colors
|
146
146
|
|
147
147
|
**SeasonalChart**
|
@@ -160,6 +160,7 @@ _ Inherits from SerialChart _
|
|
160
160
|
- legend = True
|
161
161
|
- stacked = False
|
162
162
|
- type = "bars" # [bars|pie]
|
163
|
+
- label_placement = "legend" # legend|outside|none
|
163
164
|
|
164
165
|
**CategoricalChartWithReference**
|
165
166
|
|
@@ -234,6 +235,15 @@ Roadmap
|
|
234
235
|
Changelog
|
235
236
|
---------
|
236
237
|
|
238
|
+
- 1.70.2
|
239
|
+
|
240
|
+
- Fix edge case bug in y axis cutoff logic
|
241
|
+
|
242
|
+
- 1.70.1
|
243
|
+
|
244
|
+
- Make sure y axis is cut at 100 % unless we are really, really certain it should be higher
|
245
|
+
- Revert some more padding changes from 1.65.2 and 1.65.3
|
246
|
+
|
237
247
|
- 1.70.0
|
238
248
|
|
239
249
|
- Pillow==11.1.0 (possibly faster png rendering)
|
@@ -556,10 +556,10 @@ class Chart(object):
|
|
556
556
|
if len(ticks_) <= 1 and self.data:
|
557
557
|
self.value_axis.set_ticks([0, self.data.max_val])
|
558
558
|
|
559
|
-
# Special handling for stacked percents, where, we want to fix any rounding errors,
|
560
|
-
# to make sure value max is 100 %, and not something like 100.00000000000001 (which
|
561
|
-
# may cause an extra tick to show up
|
562
559
|
if self.units == "percent" and self.values_will_be_stacked:
|
560
|
+
# Special handling for stacked percents, where, we want to fix any rounding errors,
|
561
|
+
# to make sure value max is 100 %, and not something like 100.00000000000001 (which
|
562
|
+
# may cause an extra tick to show up
|
563
563
|
max_val = max(self.data.stacked_values)
|
564
564
|
diff = abs(1 - max_val)
|
565
565
|
_decimals = self.decimals if self.decimals is not None else 2
|
@@ -569,6 +569,15 @@ class Chart(object):
|
|
569
569
|
self.ax.set_ylim(value_lim[0], 1)
|
570
570
|
else:
|
571
571
|
self.ax.set_xlim(value_lim[0], 1)
|
572
|
+
elif self.units == "percent":
|
573
|
+
# Cut y axis at 100 percent if not value is above
|
574
|
+
value_lim = self.ax.get_ylim() if value_axis == "_y" else self.ax.get_xlim()
|
575
|
+
if self.data.max_val <= 1 and value_lim[1] > 1:
|
576
|
+
value_lim = self.ax.get_ylim() if value_axis == "_y" else self.ax.get_xlim()
|
577
|
+
if value_axis == "_y":
|
578
|
+
self.ax.set_ylim(value_lim[0], 1)
|
579
|
+
else:
|
580
|
+
self.ax.set_xlim(value_lim[0], 1)
|
572
581
|
|
573
582
|
for a in self.annotations:
|
574
583
|
self._annotate_point(a["text"], a["xy"], a["direction"])
|
@@ -651,7 +660,7 @@ class Chart(object):
|
|
651
660
|
# ticks labels
|
652
661
|
tick_label_height
|
653
662
|
# some padding
|
654
|
-
+
|
663
|
+
+ 30 / self._h
|
655
664
|
# chart notes (if any)
|
656
665
|
+ self._note_rel_height
|
657
666
|
# chart caption and logo (if any)
|
@@ -850,7 +859,7 @@ class Chart(object):
|
|
850
859
|
if self._title_elem:
|
851
860
|
rel_height += self._text_rel_height(self._title_elem)
|
852
861
|
# Adds a fixed margin below
|
853
|
-
rel_height +=
|
862
|
+
rel_height += 30 / self._h
|
854
863
|
return rel_height
|
855
864
|
|
856
865
|
@property
|
@@ -859,8 +868,8 @@ class Chart(object):
|
|
859
868
|
if self._subtitle_elem:
|
860
869
|
rel_height += self._text_rel_height(self._subtitle_elem)
|
861
870
|
# Adds a fixed margin below
|
862
|
-
rel_height += 0.012
|
863
|
-
|
871
|
+
# rel_height += 0.012
|
872
|
+
rel_height += 15 / self._h
|
864
873
|
return rel_height
|
865
874
|
|
866
875
|
@property
|
@@ -1,9 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: newsworthycharts
|
3
|
-
Version: 1.70.
|
3
|
+
Version: 1.70.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.70.
|
6
|
+
Download-URL: https://github.com/jplusplus/newsworthycharts/archive/1.70.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
|
@@ -167,7 +167,7 @@ These settings are available for all chart types:
|
|
167
167
|
- value_labels = False # Print out values at points on line?
|
168
168
|
- highlighted_x_ranges = [] # List of tuples with start and end of highlighted areas
|
169
169
|
- x_range_labels = [] # List of labels for highlighted areas
|
170
|
-
- label_placement = "legend" # legend|inline|outside|line
|
170
|
+
- label_placement = "legend" # legend|inline|outside|line|none
|
171
171
|
- color_labels = None # A dictionary of label/color, to override style colors
|
172
172
|
|
173
173
|
**SeasonalChart**
|
@@ -186,6 +186,7 @@ _ Inherits from SerialChart _
|
|
186
186
|
- legend = True
|
187
187
|
- stacked = False
|
188
188
|
- type = "bars" # [bars|pie]
|
189
|
+
- label_placement = "legend" # legend|outside|none
|
189
190
|
|
190
191
|
**CategoricalChartWithReference**
|
191
192
|
|
@@ -260,6 +261,15 @@ Roadmap
|
|
260
261
|
Changelog
|
261
262
|
---------
|
262
263
|
|
264
|
+
- 1.70.2
|
265
|
+
|
266
|
+
- Fix edge case bug in y axis cutoff logic
|
267
|
+
|
268
|
+
- 1.70.1
|
269
|
+
|
270
|
+
- Make sure y axis is cut at 100 % unless we are really, really certain it should be higher
|
271
|
+
- Revert some more padding changes from 1.65.2 and 1.65.3
|
272
|
+
|
263
273
|
- 1.70.0
|
264
274
|
|
265
275
|
- Pillow==11.1.0 (possibly faster png rendering)
|
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.70.0 → newsworthycharts-1.70.2}/newsworthycharts/translations/regions.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{newsworthycharts-1.70.0 → newsworthycharts-1.70.2}/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
|