newsworthycharts 1.61.3__py3-none-any.whl → 1.62.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.61.3"
1
+ __version__ = "1.62.0"
2
2
 
3
3
  from .chart import Chart
4
4
  from .choroplethmap import ChoroplethMap
@@ -47,7 +47,7 @@ class ScatterPlot(Chart):
47
47
 
48
48
  # hard coded max number of ticks for now
49
49
  # consider dynamic/more clever approach
50
- max_ticks = 5
50
+ max_ticks = 7
51
51
  self.ax.yaxis.set_major_locator(MaxNLocator(nbins=max_ticks))
52
52
  self.ax.xaxis.set_major_locator(MaxNLocator(nbins=max_ticks))
53
53
 
@@ -34,7 +34,7 @@ class SerialChart(Chart):
34
34
  # Set with of lines explicitly (otherwise determined by style file)
35
35
  self.line_width = None
36
36
 
37
- self.max_ticks = 7
37
+ self.max_ticks = 10
38
38
 
39
39
  # Manually set tick locations and labels? Provide a list of tuples:
40
40
  # [(2013-01-01, "-13"), (2014-01-01, "-14"), (2015-01-01, "-15")]
@@ -266,7 +266,7 @@ class SerialChart(Chart):
266
266
  marker='.',
267
267
  zorder=12)
268
268
 
269
- if len(self.labels) > i:
269
+ if len(self.labels) > i and any([x[1] for x in serie]):
270
270
  line.set_label(self.labels[i])
271
271
 
272
272
  if self.label_placement == "line":
@@ -381,7 +381,7 @@ class SerialChart(Chart):
381
381
  bars = self.ax.bar(dates, values, **bar_kwargs)
382
382
  bar_elems.append(bars)
383
383
 
384
- if len(self.labels) > i:
384
+ if len(self.labels) > i and any([x[1] for x in serie]):
385
385
  bars.set_label(self.labels[i])
386
386
 
387
387
  # Add annotations
@@ -478,7 +478,7 @@ class SerialChart(Chart):
478
478
  y=self.baseline,
479
479
  linewidth=1,
480
480
  color="#444444",
481
- zorder=6,
481
+ zorder=11,
482
482
  linestyle="--" if self.baseline else "-"
483
483
  )
484
484
  if self.baseline_annotation:
@@ -640,7 +640,7 @@ class SerialChart(Chart):
640
640
  xmin=0,
641
641
  xmax=1,
642
642
  clip_on=False,
643
- zorder=6,
643
+ zorder=11,
644
644
  )
645
645
 
646
646
  def _adust_texts_vertically(self, elements, ha="left"):
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: newsworthycharts
3
- Version: 1.61.3
3
+ Version: 1.62.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.61.3.tar.gz
6
+ Download-URL: https://github.com/jplusplus/newsworthycharts/archive/1.62.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
@@ -160,7 +160,7 @@ These settings are available for all chart types:
160
160
  - baseline = 0 # The “zero” line. Useful for plotting deviations, e.g. temperatures above/below mean
161
161
  - baseline_annotation = None # A label for the baseline
162
162
  - line_width = None # To override style settings
163
- - max_ticks = 7 # Maximum number of ticks on the x axis
163
+ - max_ticks = 10 # Maximum number of ticks on the x axis
164
164
  - ticks = None # Custom ticks on the x axis, as a list of lists or tuples: `[(2013-01-01, "-13"), (2014-01-01, "-14"), (2015-01-01, "-15")]`
165
165
  - ymin = None # Minimum value on y axis. If None, it will be calculated from data
166
166
  - ymax = None # Maximum value on y axis. If None, it will be calculated from data
@@ -253,6 +253,16 @@ Roadmap
253
253
  Changelog
254
254
  ---------
255
255
 
256
+ - 1.62.0
257
+
258
+ - max_ticks default is now 10 in SerialChart and 7 in ScatterPlot
259
+ - Don't print legend labels for empty series
260
+
261
+ - 1.61.4
262
+
263
+ - Make sure y axis and/or baseline is in front of bar padding
264
+ - Make sure hlines are in front of bar padding
265
+
256
266
  - 1.61.3
257
267
 
258
268
  - z-ordering fix in stacked bar charts
@@ -1,4 +1,4 @@
1
- newsworthycharts/__init__.py,sha256=u6vihRaQbJ0Wpazujsxpq-IS7W6GSN6lFAXqOG7MkoI,1160
1
+ newsworthycharts/__init__.py,sha256=2OKp_SEJ9C3NBNq_s_fceXBptJodNLYB2Ex2BwTLymE,1160
2
2
  newsworthycharts/bubblemap.py,sha256=nkocWmpiFgfjEuJGAsthjY5X7Q56jXWsZHUGXw4PwgE,2587
3
3
  newsworthycharts/categoricalchart.py,sha256=LwOZ3VbNy9vzvoK0s77AkbfMt4CXVDSAhnsnBInUIrE,14764
4
4
  newsworthycharts/chart.py,sha256=bCUkNKjFfuGRN6_VRQ-yCHla5LIMZ9H9a16upWbeWmY,30681
@@ -6,9 +6,9 @@ newsworthycharts/choroplethmap.py,sha256=bCLf4kcchp1C2djg5AxcOM8BdbaMj0xg7UHrZsD
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
- newsworthycharts/scatterplot.py,sha256=6iaMoiZx__Gc-2Hcdw-8Ga5dSonrFo3oexKNmSFuir4,4959
9
+ newsworthycharts/scatterplot.py,sha256=l2w2JkA_4WzxQG9XG1Pn62IlJOdCMm1VemMiZL0rEfU,4959
10
10
  newsworthycharts/seasonalchart.py,sha256=rr55yqJUkaYDR9Ik98jes6574oY1U8t8LwoLE3gClW4,1967
11
- newsworthycharts/serialchart.py,sha256=FOILuBd_NP-YZNeJwCTz89hPCiO1mDBcJmTEaJVbsw8,27294
11
+ newsworthycharts/serialchart.py,sha256=DSqCyjyjViXN7IBKteM1JI4t3OyXlYGi3LvqmXrpAY0,27359
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=vbYTav1w3DmB5tpaaV7Xl5q7TQJsc9eou6pLCoWc2v
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.3.dist-info/LICENSE.txt,sha256=Sq6kGICrehbhC_FolNdXf0djKjTpv3YqjFCIYsxdQN4,1069
32
- newsworthycharts-1.61.3.dist-info/METADATA,sha256=FH47AXXq2GHTmWEWqkZz_hiIwDCZIXUz-KB1E2nD4xE,28876
33
- newsworthycharts-1.61.3.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
34
- newsworthycharts-1.61.3.dist-info/top_level.txt,sha256=dn_kzIj8UgUCMsh1PHdVEQJHVGSsN7Z8YJF-8xXa8n0,17
35
- newsworthycharts-1.61.3.dist-info/RECORD,,
31
+ newsworthycharts-1.62.0.dist-info/LICENSE.txt,sha256=Sq6kGICrehbhC_FolNdXf0djKjTpv3YqjFCIYsxdQN4,1069
32
+ newsworthycharts-1.62.0.dist-info/METADATA,sha256=X5hJsyp_VkwOSMXUYKnLkQUCdBGHzDt_k9Tv_Hb4Tkw,29127
33
+ newsworthycharts-1.62.0.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
34
+ newsworthycharts-1.62.0.dist-info/top_level.txt,sha256=dn_kzIj8UgUCMsh1PHdVEQJHVGSsN7Z8YJF-8xXa8n0,17
35
+ newsworthycharts-1.62.0.dist-info/RECORD,,