Skip to main content

plot matplotlib graph easily

Project description

lazyplot

Module for using matplotlib easily.

install

pip install lazyplot

usage

lazy_plot

Draw graphs by entering only np.ndarray data.

from lazyplot import lazy_plot
x = np.random.rand(3, 30)
lazy_plot(x)

# Simple customization
lazy_plot(x, figure_config={"figsize"=(8,20), "colmuns"=2, "plot_type_2d"="plot"})

custom plot

Draw more detailed graph by using user-specified LazyAxes

from lazyplot import LazyAxes, custom_plot
draw_info = LazyAxes(y=np.random.rand(2,30), title="random value", plot_type="scatter", color="blue")
custom_plot(draw_info)

FigureConfig

FigreConfig can be overridden by giving a dictionary-type configuration item to the figure_config of lazy_plot and custom_plot.

  • figsize (tuple[int, int])figsize of matplotlib.Figure (default= (5, 4))

  • layout ("tight" | "constrained") : layout of matplotlib.Figure (default= "constrained")

  • linewidth (float) : linewidth of graph (default= 2.0)

  • columns (int) : number of columns in graph display. (default= 1)

  • plot_type_1d ("plot" | "hist" | "bar"): default plot type of 1 demensional array. (default= "plot")

  • plot_type_1d ("plot" | "scatter" | "imshow" | "boxplot"): default plot type of 2 demensional array. (default= "imshow")

  • plot_type_3d ("scatter"): default plot type of 3 demensional array. (default= "scatter")

  • dpi (float) : dpi of matplotlib.Figure (default= 100)

LazyAxes

  • y (np.ndarray) *REQUIRED

  • plot_type ("plot" | "hist" | "bar" | "scatter" | "imshow" | "boxplot") *REQUIRED

  • title (str)

  • t (np.ndarray)

  • labels (list[str])

  • x_label (str)

  • y_label (str)

  • x_lim (tuple[float|None, float|None])

  • y_lim (tuple[float|None, float|None])

  • color (list[str | tuple[int, int, int]])

  • alpha (float)

  • line_style (list[str])

  • marker_style (list[str])

  • linewidth (float)

  • aspect (float | Literal["auto"])

  • invert_xaxis (bool)

  • invert_yaxis (bool)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lazyplot-0.1.7.tar.gz (137.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lazyplot-0.1.7-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file lazyplot-0.1.7.tar.gz.

File metadata

  • Download URL: lazyplot-0.1.7.tar.gz
  • Upload date:
  • Size: 137.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.13

File hashes

Hashes for lazyplot-0.1.7.tar.gz
Algorithm Hash digest
SHA256 446e9bf64c1c2e099a4da4531c19f6aaedd2daa7b31d3c5b95a322a9fcab494a
MD5 8731990549e7694fb883251586730de5
BLAKE2b-256 d3b3603358730ab0a48fdccc17b0de22bdfbee7cc4e23c1b92ce71cdec6eac08

See more details on using hashes here.

File details

Details for the file lazyplot-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: lazyplot-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.13

File hashes

Hashes for lazyplot-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 71885508558487015eea4f602659b8705dcf4024ac5b4f8437b8f200298de6bc
MD5 70f5306bb10de94d366aa031ba5c7316
BLAKE2b-256 ff0fb2433446275a91bc97224b6deeedc05ffe19a3f1e7bed97154b43f2d826c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page