pandas-plots 0.15.4__py3-none-any.whl → 0.15.5__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.
pandas_plots/pls.py CHANGED
@@ -233,7 +233,7 @@ def plot_stacked_bars(
233
233
  height: int = 500,
234
234
  width: int = 2000,
235
235
  title: str = None,
236
- renderer: Literal["png", "svg", None] = "png",
236
+ renderer: Literal["png", "svg", "notebook"] = "notebook",
237
237
  caption: str = None,
238
238
  sort_values: bool = False,
239
239
  sort_values_index: bool = False,
@@ -504,7 +504,7 @@ def plot_stacked_bars(
504
504
  fig.write_image(Path(png_path).as_posix())
505
505
 
506
506
  fig.show(
507
- renderer=renderer,
507
+ renderer=renderer or os.getenv("RENDERER"),
508
508
  width=width,
509
509
  height=height,
510
510
  )
@@ -526,7 +526,7 @@ def plot_bars(
526
526
  use_ci: bool = False,
527
527
  ci_agg: Literal["mean", "median"] = "mean",
528
528
  precision: int = 0,
529
- renderer: Literal["png", "svg", None] = "png",
529
+ renderer: Literal["png", "svg", "notebook"] = "notebook",
530
530
  png_path: Path | str = None,
531
531
  ) -> None:
532
532
  """
@@ -785,7 +785,7 @@ def plot_bars(
785
785
 
786
786
  # * set axis title
787
787
  _fig.show(
788
- renderer,
788
+ renderer=renderer or os.getenv("RENDERER"),
789
789
  width=width,
790
790
  height=height,
791
791
  )
@@ -809,7 +809,7 @@ def plot_histogram(
809
809
  width: int = 1600,
810
810
  text_auto: bool = True,
811
811
  barmode: Literal["group", "overlay", "relative"] = "relative",
812
- renderer: Literal["png", "svg", None] = "png",
812
+ renderer: Literal["png", "svg", "notebook"] = "notebook",
813
813
  caption: str = None,
814
814
  title: str = None,
815
815
  png_path: Path | str = None,
@@ -1008,7 +1008,7 @@ def plot_box(
1008
1008
  x_max: float = None,
1009
1009
  use_log: bool = False,
1010
1010
  png_path: Path | str = None,
1011
- renderer: Literal["png", "svg", None] = "png",
1011
+ renderer: Literal["png", "svg", "notebook"] = "notebook",
1012
1012
  ) -> None:
1013
1013
  """
1014
1014
  Plots a horizontal box plot for the given pandas Series.
@@ -1143,7 +1143,7 @@ def plot_box(
1143
1143
  )
1144
1144
 
1145
1145
  fig.show(
1146
- renderer=renderer,
1146
+ renderer=renderer or os.getenv("RENDERER"),
1147
1147
  width=width,
1148
1148
  height=height,
1149
1149
  )
@@ -1172,7 +1172,7 @@ def plot_boxes(
1172
1172
  use_log: bool = False,
1173
1173
  box_width: float = 0.5,
1174
1174
  png_path: Path | str = None,
1175
- renderer: Literal["png", "svg", None] = "png",
1175
+ renderer: Literal["png", "svg", "notebook"] = "notebook",
1176
1176
  ) -> None:
1177
1177
  """
1178
1178
  [Experimental] Plot vertical boxes for each unique item in the DataFrame and add annotations for statistics.
@@ -1309,7 +1309,7 @@ def plot_boxes(
1309
1309
  marker=dict(size=5), width=box_width
1310
1310
  ) # Adjust width (default ~0.5)
1311
1311
 
1312
- fig.show(renderer=renderer, width=width, height=height)
1312
+ fig.show(renderer=renderer or os.getenv("RENDERER"), width=width, height=height)
1313
1313
  if summary:
1314
1314
  # * sort df by first column
1315
1315
  print_summary(df=df.sort_values(df.columns[0]), precision=precision)
@@ -1331,7 +1331,7 @@ def plot_facet_stacked_bars(
1331
1331
  subplot_size: int = 300,
1332
1332
  color_palette: str = "Plotly",
1333
1333
  caption: str = "",
1334
- renderer: Optional[Literal["png", "svg"]] = "png",
1334
+ renderer: Optional[Literal["png", "svg", "notebook"]] = "png",
1335
1335
  annotations: bool = False,
1336
1336
  precision: int = 0,
1337
1337
  png_path: Optional[Path] = None,
@@ -1522,7 +1522,7 @@ def plot_facet_stacked_bars(
1522
1522
  fig.write_image(str(png_path))
1523
1523
 
1524
1524
  fig.show(
1525
- renderer=renderer,
1525
+ renderer=renderer or os.getenv("RENDERER"),
1526
1526
  width=subplot_size * subplots_per_row,
1527
1527
  height=subplot_size
1528
1528
  * (-(-len(aggregated_df["facet"].unique()) // subplots_per_row)),
@@ -1860,8 +1860,7 @@ def plot_sankey(
1860
1860
  )
1861
1861
 
1862
1862
  fig.update_layout(title_text=chart_title, font_size=font_size)
1863
- fig.show(renderer=renderer, width=width, height=height)
1864
-
1863
+ fig.show(renderer=renderer or os.getenv("RENDERER"), width=width, height=height)
1865
1864
 
1866
1865
  # * extend objects to enable chaining
1867
1866
  pd.DataFrame.plot_bars = plot_bars
pandas_plots/tbl.py CHANGED
@@ -67,7 +67,7 @@ def describe_df(
67
67
  use_columns: bool = True,
68
68
  use_missing: bool = False,
69
69
  renderer: Literal["png", "svg", None] = "png",
70
- fig_cols: int = 3,
70
+ fig_cols: int = 5,
71
71
  fig_offset: int = None,
72
72
  fig_rowheight: int = 300,
73
73
  fig_width: int = 400,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pandas-plots
3
- Version: 0.15.4
3
+ Version: 0.15.5
4
4
  Summary: A collection of helper for table handling and visualization
5
5
  Project-URL: Homepage, https://github.com/smeisegeier/pandas-plots
6
6
  Project-URL: Repository, https://github.com/smeisegeier/pandas-plots
@@ -120,7 +120,9 @@ tbl.show_num_df(
120
120
  - `add_measures_to_pyg_config()` adds measures to a pygwalker config file to avoid frequent manual update
121
121
  <br>
122
122
 
123
- > note: theme setting ☀️ 🌔 can be controlled through all functions by setting the environment variable `THEME` to either light or dark
123
+ > theme setting ☀️ 🌔 can be controlled through all functions by setting the environment variable `'THEME'` to either `'light'` or `'dark'`
124
+
125
+ > renderer can be controlled through all functions by setting the environment variable `'RENDERER'` to `'png'` for printing to markdown or pdf
124
126
 
125
127
  ## prerequisites
126
128
 
@@ -0,0 +1,9 @@
1
+ pandas_plots/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ pandas_plots/hlp.py,sha256=z8rrVNbH9qMohdXPT-FksP-VkTOjI0bGFj47Sw5p3aY,21141
3
+ pandas_plots/pls.py,sha256=AVi4pexDoJPUCAntrf1OlBvu_Jiwi22zKB01nVL42AM,65107
4
+ pandas_plots/tbl.py,sha256=YR-Wq2SXNFBqgqBJncrKPirb0hBKBLm-A8H2BqkxaI4,33057
5
+ pandas_plots/ven.py,sha256=2x3ACo2vSfO3q6fv-UdDQ0h1SJyt8WChBGgE5SDCdCk,11673
6
+ pandas_plots-0.15.5.dist-info/METADATA,sha256=KwyTlqPc0wCHLHahN2tGmCNSbwdTeGppwy5QJFF2xsk,8001
7
+ pandas_plots-0.15.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
+ pandas_plots-0.15.5.dist-info/licenses/LICENSE,sha256=ltLbQWUCs-GBQlTPXbt5nHNBE9U5LzjjoS1Y8hHETM4,1051
9
+ pandas_plots-0.15.5.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- pandas_plots/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- pandas_plots/hlp.py,sha256=z8rrVNbH9qMohdXPT-FksP-VkTOjI0bGFj47Sw5p3aY,21141
3
- pandas_plots/pls.py,sha256=6ZvgO1lkaff-Wpj9zGu4J3vJybj1D94qjS2-coB83c8,64882
4
- pandas_plots/tbl.py,sha256=y_4ZFVogCRp4v8g6IKzxEnGVHdRUZbF0ACLugJW2_G8,33057
5
- pandas_plots/ven.py,sha256=2x3ACo2vSfO3q6fv-UdDQ0h1SJyt8WChBGgE5SDCdCk,11673
6
- pandas_plots-0.15.4.dist-info/METADATA,sha256=PfwI0peS8Qmw3Alio9x3zvyQaUKiHKKM7wwlQ2ncyis,7853
7
- pandas_plots-0.15.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
- pandas_plots-0.15.4.dist-info/licenses/LICENSE,sha256=ltLbQWUCs-GBQlTPXbt5nHNBE9U5LzjjoS1Y8hHETM4,1051
9
- pandas_plots-0.15.4.dist-info/RECORD,,