Skip to content

Commit 94366fc

Browse files
authored
Create new branch (#537)
1 parent fe49cdf commit 94366fc

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/PyPlot.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
11

2+
"""
3+
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.
4+
5+
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(...).
6+
For example, plt.plot(x, y) also works. (And the raw PyObject for the matplotlib modules is also accessible as PyPlot.matplotlib.)
7+
8+
In general, all the arguments are the same as in Python.
9+
10+
Here's a brief demo of a simple plot in Julia:
11+
12+
using PyPlot
13+
x = range(0; stop=2*pi, length=1000); y = sin.(3 * x + 4 * cos.(2 * x));
14+
plot(x, y, color="red", linewidth=2.0, linestyle="--")
15+
title("A sinusoidally modulated sinusoid")
16+
17+
For more information on API, see the matplotlib.pyplot documentation and the PyPlot GitHub page.
18+
"""
219
module PyPlot
320

421
using PyCall

0 commit comments

Comments
 (0)