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.5.tar.gz (114.3 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.5-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lazyplot-0.1.5.tar.gz
  • Upload date:
  • Size: 114.3 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.5.tar.gz
Algorithm Hash digest
SHA256 77ea65efe5f17844b6242808f7e52d1a92c157b2441a49b5dbafa054879a816d
MD5 c8cf4690b277a0f8d6074d2d69f45420
BLAKE2b-256 8fe58ebbdaaf5ee79c8231c3681b4e210e89ac571a0f083b2b5cf29397042987

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lazyplot-0.1.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ed56ba0de648041319e9d542450faa58a761ed559d94728b1f44223cbccef0d5
MD5 0c45ab84e1faf6fa86bfc6257f5db8c6
BLAKE2b-256 96c467f8d936e273f30c5e042a28e30260b746b72b65f3d55d4774593afa8cb8

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