A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/stephane-caron/uplot-python below:

stephane-caron/uplot-python: Python wrapper for μPlot 📈

Python wrapper for μPlot 📈

conda install -c conda-forge uplot-python

The plot function has the same API as µPlot's uPlot.plot:

import numpy as np
import uplot

t = np.linspace(0.0, 1.0, 10)
data = [t, np.exp(0.42 * t)]  # list of NumPy arrays
opts = {
    "width": 1920,
    "height": 600,
    "title": "Example with uplot.plot",
    "series": [{}, { "stroke": "red", }, ],
}

uplot.plot(opts, data)

For convenience, the library also provides a plot2 function with additional defaults aimed at time series and line plots, for an experience closer to matplotlib.pyplot.plot:

import numpy as np
import uplot

t = np.linspace(0.0, 1.0, 10)
uplot.plot2(
    t,
    [np.exp(0.1 * t), np.exp(-10.0 * t), np.cos(t)],
    title="Example with uplot.plot2",
    left_labels=["exp(A t)", "exp(-B t)", "cos(t)"],
)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4