kplot 1.1.0__tar.gz → 1.1.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: kplot
3
- Version: 1.1.0
3
+ Version: 1.1.1
4
4
  Summary: a matplotlib wrapper for keyan :-)
5
5
  Requires-Dist: matplotlib>=3.10.8
6
6
  Requires-Dist: numpy>=2.4.2
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "kplot"
3
- version = "1.1.0"
3
+ version = "1.1.1"
4
4
  description = "a matplotlib wrapper for keyan :-)"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -4,6 +4,8 @@
4
4
  from kplot.axes import access_subplots
5
5
  from kplot.utils import alias_kwarg, parse_multiax_params, column_width, two_column_width
6
6
  from kplot.cmaps import Norm, Cmap
7
+
8
+ from kbasic.array import tile
7
9
  import numpy as np
8
10
  import matplotlib.pyplot as plt
9
11
  from mpl_toolkits.axes_grid1 import make_axes_locatable
@@ -148,7 +150,7 @@ def show(
148
150
  figsize: tuple[float, float] = (10, 10),
149
151
  show: bool = False,
150
152
  #plot parameters
151
- cmap = default_cmap,
153
+ cmap = plt.cm.plasma,
152
154
  colorbar: bool = True,
153
155
  colorbar_style: dict = {'location':'right', "size":"7%", "pad":0.05},
154
156
  cticks: list|None = None,
@@ -268,7 +270,7 @@ def contour(
268
270
  assert (ndims:=len(Z.shape))==2, f"show was given an image with {ndims} dimensions, please provide a 2d array"
269
271
  # check axes
270
272
  if x is None: x, y = np.mgrid[:Z.shape[0], :Z.shape[1]]
271
- else: assert (len(x), len(y)) == Z.shape, f"Given x of shape {len(x)} and y of shape {len(y)} but image is of shape {image.shape}"
273
+ else: assert (len(x), len(y)) == Z.shape, f"Given x of shape {len(x)} and y of shape {len(y)} but image is of shape {Z.shape}"
272
274
  # prep figure
273
275
  if ax is None: (fig, ax) = plt.subplots(figsize=figsize)
274
276
  fig = ax.get_figure()
@@ -313,7 +315,7 @@ def contourf(
313
315
  show: bool = False,
314
316
  #plot parameters
315
317
  levels = 10,
316
- cmap = default_cmap,
318
+ cmap = plt.cm.plasma,
317
319
  colorbar: bool = True,
318
320
  colorbar_style: dict = {'location':'right', "size":"7%", "pad":0.05},
319
321
  cticks: list|None = None,
@@ -331,8 +333,8 @@ def contourf(
331
333
  # prep data
332
334
  assert (ndims:=len(Z.shape))==2, f"show was given an image with {ndims} dimensions, please provide a 2d array"
333
335
  # check axes
334
- if x is None: x, y = np.mgrid[:z.shape[0], :z.shape[1]]
335
- else: assert (len(x), len(y)) == z.shape, f"Given x of shape {len(x)} and y of shape {len(y)} but image is of shape {image.shape}"
336
+ if x is None: x, y = np.mgrid[:Z.shape[0], :Z.shape[1]]
337
+ else: assert (len(x), len(y)) == Z.shape, f"Given x of shape {len(x)} and y of shape {len(y)} but image is of shape {Z.shape}"
336
338
  # prep figure
337
339
  if ax is None: (fig, ax) = plt.subplots(figsize=figsize)
338
340
  fig = ax.get_figure()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes