From 39ad8fa5715bd7411e15360bfcfef635c19505ef Mon Sep 17 00:00:00 2001 From: Jingpeng Wu Date: Thu, 30 Aug 2018 16:08:19 -0400 Subject: [PATCH 1/2] fix the plt show example in README for Julia 0.7 the old one do not work in Julia 0.7 --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b950efd4..e079c7f2 100644 --- a/README.md +++ b/README.md @@ -122,8 +122,12 @@ Keyword arguments can also be passed. For example, matplotlib's [pyplot](http://matplotlib.org/) uses keyword arguments to specify plot options, and this functionality is accessed from Julia by: + using PyCall + using Statistics @pyimport matplotlib.pyplot as plt - x = linspace(0,2*pi,1000); y = sin(3*x + 4*cos(2*x)); + @pyimport math + x = range(0, step=2*pi, length=1000); + y = math.sin.(3.*x + 4*math.cos.(2.*x)); plt.plot(x, y, color="red", linewidth=2.0, linestyle="--") plt.show() From 730399ca26adb7276977c190680cb0b91955c382 Mon Sep 17 00:00:00 2001 From: Jingpeng Wu Date: Fri, 31 Aug 2018 14:17:19 -0400 Subject: [PATCH 2/2] update plt example for Julia 0.7 --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e079c7f2..07ffe095 100644 --- a/README.md +++ b/README.md @@ -123,11 +123,9 @@ Keyword arguments can also be passed. For example, matplotlib's options, and this functionality is accessed from Julia by: using PyCall - using Statistics @pyimport matplotlib.pyplot as plt - @pyimport math - x = range(0, step=2*pi, length=1000); - y = math.sin.(3.*x + 4*math.cos.(2.*x)); + x = range(0, stop=2*pi, length=1000); + y = sin.(3 .* x + 4 .* cos.(2 .* x)); plt.plot(x, y, color="red", linewidth=2.0, linestyle="--") plt.show()