plotnine 0.16.0a1__py3-none-any.whl → 0.16.0a2__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.
@@ -55,6 +55,7 @@ def get_mimebundle(
55
55
  }
56
56
  mimetype = lookup[format]
57
57
 
58
+ image: bytes | str = b
58
59
  metadata: dict[str, DisplayMetadata] = {}
59
60
  w, h = figure_size_px
60
61
  if format in ("png", "jpeg"):
@@ -62,5 +63,7 @@ def get_mimebundle(
62
63
  elif format == "retina":
63
64
  # `retina=True` in IPython.display.Image just halves width/height
64
65
  metadata = {mimetype: {"width": w // 2, "height": h // 2}}
66
+ elif format == "svg":
67
+ image = b.decode()
65
68
 
66
- return {mimetype: b}, metadata
69
+ return {mimetype: image}, metadata
plotnine/typing.py CHANGED
@@ -157,4 +157,6 @@ class DisplayMetadata(TypedDict):
157
157
  height: NotRequired[int]
158
158
 
159
159
 
160
- MimeBundle: TypeAlias = tuple[dict[str, bytes], dict[str, DisplayMetadata]]
160
+ MimeBundle: TypeAlias = tuple[
161
+ dict[str, bytes | str], dict[str, DisplayMetadata]
162
+ ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plotnine
3
- Version: 0.16.0a1
3
+ Version: 0.16.0a2
4
4
  Summary: A Grammar of Graphics for Python
5
5
  Author-email: Hassan Kibirige <has2k1@gmail.com>
6
6
  License: The MIT License (MIT)
@@ -10,7 +10,7 @@ plotnine/layer.py,sha256=l9ehqvWoDpaZdVFLGoiA5USL79NYWWaiZM_ZuDeGzpo,17294
10
10
  plotnine/options.py,sha256=j3zXv4wc3J4nOI_TqJ5s_abuifodt_UN8MR8M4i8UVA,3108
11
11
  plotnine/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  plotnine/qplot.py,sha256=BSAb4u5I7PaPGofkAgx7brdCNTjMZvC_TDGHVUZ35xM,7384
13
- plotnine/typing.py,sha256=oYfYgClVYLq5TNso2wvN7dJ2oDJyAf3e72U8NLb0yFs,4212
13
+ plotnine/typing.py,sha256=rv1ZPGbY_6CYCs3pgYaM8om95gHz_AiFU3szbpgFQns,4224
14
14
  plotnine/watermark.py,sha256=JJnqNynytg7dzu88jX4OymnyhY-kmSj62gFTOoqXrhM,1509
15
15
  plotnine/_mpl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  plotnine/_mpl/gridspec.py,sha256=LtMwQTUffSCvxiOh7LIK6sKIplc6dG2IHTjXxl1FHHk,9097
@@ -33,7 +33,7 @@ plotnine/_utils/__init__.py,sha256=wefs_rvVdrWwhyWtDLarI6Bm7CDNUSSBWYlvbdWDzLQ,3
33
33
  plotnine/_utils/context.py,sha256=e2W9PM5OyGuyAEOxyu5YE0HXmlsNgbMpdjqdOABQA3s,3896
34
34
  plotnine/_utils/dataclasses.py,sha256=ahEoC7WeMsRB4_M9YBAuMpR-xm6LkpryAueLwJMXkNo,609
35
35
  plotnine/_utils/dev.py,sha256=0qgRbMhcd4dfuLuYxx0skocKAtfwHF02ntyILRBogbg,1629
36
- plotnine/_utils/ipython.py,sha256=r5JfBCO9BEqXHoP5JGxxYdGTj5zuLNs44kdLhTz5o2o,1684
36
+ plotnine/_utils/ipython.py,sha256=mGD83wi3q0Sk2XfAbr9zyBxYNXVwXv-lmgnA3QXH0bI,1768
37
37
  plotnine/_utils/quarto.py,sha256=S2wa9lx8I6S3yFiDvVEjB3X6WumSm-y9iYPupmgAQNo,1787
38
38
  plotnine/_utils/registry.py,sha256=HoiB2NnbEHufXjYnVJyrJKflk2RwKtTYk2L3n7tH4XA,3321
39
39
  plotnine/_utils/yippie.py,sha256=DbmxvVrd34P24CCmOZrAulyGQ35rXNaSr8BuutS2Uio,2392
@@ -222,8 +222,8 @@ plotnine/themes/elements/element_line.py,sha256=zJ6KL2_LcQ0aQjT4fzNA1f9c1QZ3xEeT
222
222
  plotnine/themes/elements/element_rect.py,sha256=w5cLH-Sr4cTRXVdkRiu8kBqFt3TXHhIb1MUITfi89gE,1767
223
223
  plotnine/themes/elements/element_text.py,sha256=NrHlGKB0cO0v_C7hkarTMPb2QVsTOoxVuCMS6hmv62U,6552
224
224
  plotnine/themes/elements/margin.py,sha256=jMHe-UKHHer_VYwAVDC-Tz2-AP_4YDuXPTWAuacoqgU,4080
225
- plotnine-0.16.0a1.dist-info/licenses/LICENSE,sha256=GY4tQiUd17Tq3wWR42Zs9MRTFOTf6ahIXhZTcwAdOeU,1082
226
- plotnine-0.16.0a1.dist-info/METADATA,sha256=9tv-tSOFTYwhr-hHG0oSg4P-_XuP_YmA5t4_JNaSvA0,9498
227
- plotnine-0.16.0a1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
228
- plotnine-0.16.0a1.dist-info/top_level.txt,sha256=t340Mbko1ZbmvYPkQ81dIiPHcaQdTUszYz-bWUpr8ys,9
229
- plotnine-0.16.0a1.dist-info/RECORD,,
225
+ plotnine-0.16.0a2.dist-info/licenses/LICENSE,sha256=GY4tQiUd17Tq3wWR42Zs9MRTFOTf6ahIXhZTcwAdOeU,1082
226
+ plotnine-0.16.0a2.dist-info/METADATA,sha256=xj-INX2wadP6ZX7rAP0LBZBbLWwoZMMp3At6ZeusAY8,9498
227
+ plotnine-0.16.0a2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
228
+ plotnine-0.16.0a2.dist-info/top_level.txt,sha256=t340Mbko1ZbmvYPkQ81dIiPHcaQdTUszYz-bWUpr8ys,9
229
+ plotnine-0.16.0a2.dist-info/RECORD,,