From 0160e7a0ad40d377febd378a4d88d4c39d765591 Mon Sep 17 00:00:00 2001 From: Nicolette Laird Date: Fri, 22 Oct 2021 10:18:36 -0500 Subject: [PATCH] Create new branch --- src/PyPlot.jl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/PyPlot.jl b/src/PyPlot.jl index 72faceb1..5e0f004e 100755 --- a/src/PyPlot.jl +++ b/src/PyPlot.jl @@ -1,4 +1,21 @@ +""" +PyPlot allows Julia to interface with the Matplotlib library in Python, specifically the matplotlib.pyplot module, so you can create beautiful plots in Julia with your favorite Python package. + +Only the currently documented matplotlib.pyplot API is exported. To use other functions in the module, you can also call matplotlib.pyplot.foo(...) as plt.foo(...). +For example, plt.plot(x, y) also works. (And the raw PyObject for the matplotlib modules is also accessible as PyPlot.matplotlib.) + +In general, all the arguments are the same as in Python. + +Here's a brief demo of a simple plot in Julia: + + using PyPlot + x = range(0; stop=2*pi, length=1000); y = sin.(3 * x + 4 * cos.(2 * x)); + plot(x, y, color="red", linewidth=2.0, linestyle="--") + title("A sinusoidally modulated sinusoid") + +For more information on API, see the matplotlib.pyplot documentation and the PyPlot GitHub page. +""" module PyPlot using PyCall