newsworthycharts 1.61.0__py3-none-any.whl → 1.61.1__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/chart.py +2 -2
- newsworthycharts/serialchart.py +7 -2
- {newsworthycharts-1.61.0.dist-info → newsworthycharts-1.61.1.dist-info}/METADATA +7 -3
- {newsworthycharts-1.61.0.dist-info → newsworthycharts-1.61.1.dist-info}/RECORD +8 -8
- {newsworthycharts-1.61.0.dist-info → newsworthycharts-1.61.1.dist-info}/LICENSE.txt +0 -0
- {newsworthycharts-1.61.0.dist-info → newsworthycharts-1.61.1.dist-info}/WHEEL +0 -0
- {newsworthycharts-1.61.0.dist-info → newsworthycharts-1.61.1.dist-info}/top_level.txt +0 -0
newsworthycharts/__init__.py
CHANGED
newsworthycharts/chart.py
CHANGED
@@ -667,7 +667,7 @@ class Chart(object):
|
|
667
667
|
'Creator': f"NWCharts {__version__}",
|
668
668
|
}
|
669
669
|
"""
|
670
|
-
self._fig.savefig(buf, **args)
|
670
|
+
self._fig.savefig(buf, **args) # , bbox_inches="tight")
|
671
671
|
buf.seek(0)
|
672
672
|
self._storage.save(key, buf, img_format, storage_options)
|
673
673
|
|
@@ -716,7 +716,7 @@ class Chart(object):
|
|
716
716
|
'Creator': f"NWCharts {__version__}",
|
717
717
|
}
|
718
718
|
"""
|
719
|
-
self._fig.savefig(buf, **args)
|
719
|
+
self._fig.savefig(buf, **args) #, bbox_inches="tight")
|
720
720
|
buf.seek(0)
|
721
721
|
self._storage.save(key, buf, file_format, storage_options)
|
722
722
|
|
newsworthycharts/serialchart.py
CHANGED
@@ -46,7 +46,7 @@ class SerialChart(Chart):
|
|
46
46
|
self.colors = None
|
47
47
|
|
48
48
|
# Optional: where to place series label
|
49
|
-
self.label_placement = "legend" # legend|inline|outside
|
49
|
+
self.label_placement = "legend" # legend|inline|outside|line
|
50
50
|
|
51
51
|
# Optional: annotate each point with a value label
|
52
52
|
self.value_labels = False
|
@@ -549,7 +549,12 @@ class SerialChart(Chart):
|
|
549
549
|
_ = self.ax.legend(loc="best")
|
550
550
|
_.set(zorder=20)
|
551
551
|
elif self.label_placement == "outside":
|
552
|
-
|
552
|
+
# mpl 3.7 has loc=outside, but it will lead to overlaps with titles
|
553
|
+
# also, has to be set on the figure, causing image size to change
|
554
|
+
_ = self.ax.legend(bbox_to_anchor=(1.04, 1), loc="upper left")
|
555
|
+
# self._fig.subplots_adjust(right=0.8)
|
556
|
+
# self._fig.tight_layout()
|
557
|
+
_.set(zorder=20)
|
553
558
|
elif self.label_placement == "inline":
|
554
559
|
labelLines(self.ax.get_lines(), align=False, zorder=13, outline_width=4, fontweight="bold")
|
555
560
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: newsworthycharts
|
3
|
-
Version: 1.61.
|
3
|
+
Version: 1.61.1
|
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.61.
|
6
|
+
Download-URL: https://github.com/jplusplus/newsworthycharts/archive/1.61.1.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
|
170
|
+
- label_placement = "legend" # legend|inline|outside|line
|
171
171
|
- color_labels = None # A dictionary of label/color, to override style colors
|
172
172
|
|
173
173
|
**SeasonalChart**
|
@@ -252,6 +252,10 @@ Roadmap
|
|
252
252
|
Changelog
|
253
253
|
---------
|
254
254
|
|
255
|
+
- 1.61.1
|
256
|
+
|
257
|
+
- Improved handling of label_placement = "outside" in SerialChart
|
258
|
+
|
255
259
|
- 1.61.0
|
256
260
|
|
257
261
|
- Added non-binned color ramp support to ChoroplethMap, with `use_bins=False`
|
@@ -1,14 +1,14 @@
|
|
1
|
-
newsworthycharts/__init__.py,sha256=
|
1
|
+
newsworthycharts/__init__.py,sha256=UtUks101pRHa3vCOHg4UPZbyoH12L711yi8xRgqF1aY,1160
|
2
2
|
newsworthycharts/bubblemap.py,sha256=nkocWmpiFgfjEuJGAsthjY5X7Q56jXWsZHUGXw4PwgE,2587
|
3
3
|
newsworthycharts/categoricalchart.py,sha256=LwOZ3VbNy9vzvoK0s77AkbfMt4CXVDSAhnsnBInUIrE,14764
|
4
|
-
newsworthycharts/chart.py,sha256=
|
4
|
+
newsworthycharts/chart.py,sha256=LYrcWNq2zQY90TB1b7e-5XPyBJ2nUGkzHqip1hGm5G0,30682
|
5
5
|
newsworthycharts/choroplethmap.py,sha256=bCLf4kcchp1C2djg5AxcOM8BdbaMj0xg7UHrZsDafhI,8013
|
6
6
|
newsworthycharts/datawrapper.py,sha256=RRkAVTpfP4updKxUIBaSmKuBi2RUVPaBRF8HDQhlGGA,11250
|
7
7
|
newsworthycharts/map.py,sha256=c409jEO4L8Yr780sJRC0RchR44roAlgOUDAkuk1SfRg,6057
|
8
8
|
newsworthycharts/rangeplot.py,sha256=NE1W9TnmlpK6T3RvBJOU3nd73EXqkj17OY9i5zlw_cQ,8366
|
9
9
|
newsworthycharts/scatterplot.py,sha256=6iaMoiZx__Gc-2Hcdw-8Ga5dSonrFo3oexKNmSFuir4,4959
|
10
10
|
newsworthycharts/seasonalchart.py,sha256=rr55yqJUkaYDR9Ik98jes6574oY1U8t8LwoLE3gClW4,1967
|
11
|
-
newsworthycharts/serialchart.py,sha256=
|
11
|
+
newsworthycharts/serialchart.py,sha256=ZgCaFhxwgrNEZZNB3QnrmcWdT9PnYMtORpb_jz4fzW8,26688
|
12
12
|
newsworthycharts/storage.py,sha256=myERhlpvXyExXxUByBq9eW1bWkCyfH9SwTZbsWSyy3Q,4301
|
13
13
|
newsworthycharts/stripechart.py,sha256=9B6PX2MyLuKNQ8W0OGdKbP0-U32kju0K_NHHwwz_J68,1547
|
14
14
|
newsworthycharts/custom/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -28,8 +28,8 @@ newsworthycharts/rc/newsworthy,sha256=X0btLNrmk2DRrfOsKj_WCSIgeD6btacEN2tRF_B4m8
|
|
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.61.
|
32
|
-
newsworthycharts-1.61.
|
33
|
-
newsworthycharts-1.61.
|
34
|
-
newsworthycharts-1.61.
|
35
|
-
newsworthycharts-1.61.
|
31
|
+
newsworthycharts-1.61.1.dist-info/LICENSE.txt,sha256=Sq6kGICrehbhC_FolNdXf0djKjTpv3YqjFCIYsxdQN4,1069
|
32
|
+
newsworthycharts-1.61.1.dist-info/METADATA,sha256=9aeZ4y_rdYwGMbukHpQ6y1LaIMuyh9zX7NRg7FGqV8I,28644
|
33
|
+
newsworthycharts-1.61.1.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
|
34
|
+
newsworthycharts-1.61.1.dist-info/top_level.txt,sha256=dn_kzIj8UgUCMsh1PHdVEQJHVGSsN7Z8YJF-8xXa8n0,17
|
35
|
+
newsworthycharts-1.61.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|