MCPcopy Index your code
hub / github.com/reactive-python/reactpy / plot

Function plot

docs/source/reference/_examples/matplotlib_plot.py:49–56  ·  view source on GitHub ↗
(title, x, y)

Source from the content-addressed store, hash-verified

47
48
49def plot(title, x, y):
50 fig, axes = plt.subplots()
51 axes.plot(x, y)
52 axes.set_title(title)
53 buffer = BytesIO()
54 fig.savefig(buffer, format="png")
55 plt.close(fig)
56 return image("png", buffer.getvalue())
57
58
59def poly_coef_input(index, callback):

Callers 1

PolynomialPlotFunction · 0.85

Calls 2

imageFunction · 0.90
getvalueMethod · 0.80

Tested by

no test coverage detected