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

Uploaded Python 3

File details

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

File metadata

  • Download URL: lazyplot-0.1.6.tar.gz
  • Upload date:
  • Size: 105.6 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.6.tar.gz
Algorithm Hash digest
SHA256 bb3d6fc24f923c8bbd656f22f6307d87370e001d9023d042dbb35807ef175040
MD5 d0d18489fbf6dd67a9c8e50c696f144a
BLAKE2b-256 7c07298a37d360cd237c4982ff83441f5bbbd857768aedf9f1404eee32c1e55e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lazyplot-0.1.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4d8af8c2b7352081598b2e757dd75ae1fffea4cde6f8ab9c0ed87b315e621d8d
MD5 1d56afa627d6259767b2bb91ccbf89cc
BLAKE2b-256 bd9b3157749aff366b1f3ef89eb1efd943287e3e66f7ad55f355942624d57e56

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