Skip to content

Commit 534203f

Browse files
committed
s/PyPlot/PythonPlot/
1 parent 48f48f5 commit 534203f

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

src/PythonPlot.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,4 +310,4 @@ end
310310
using LaTeXStrings
311311
export LaTeXString, latexstring, @L_str, @L_mstr
312312

313-
end # module PyPlot
313+
end # module PythonPlot

src/colormaps.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ register_cmap(n::AbstractString, c::ColorMap) = cm_register_cmap(n,c)
151151
get_cmaps() =
152152
ColorMap[get_cmap(c) for c in
153153
sort(filter!(c -> !endswith(c, "_r"),
154-
[pyconvert(String, c) for c in PyPlot.cm.datad]),
154+
[pyconvert(String, c) for c in cm.datad]),
155155
by=lowercase)]
156156

157157
########################################################################

src/init.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# PyPlot initialization — the hardest part is finding a working backend.
1+
# PythonPlot initialization — the hardest part is finding a working backend.
22
using VersionParsing
33

44
###########################################################################
@@ -143,7 +143,7 @@ backend = "Agg"
143143
gui = :default
144144

145145
# initialization -- anything that depends on Python has to go here,
146-
# so that it occurs at runtime (while the rest of PyPlot can be precompiled).
146+
# so that it occurs at runtime (while the rest of PythonPlot can be precompiled).
147147
function __init__()
148148
isjulia_display[] = isdisplayok()
149149
PythonCall.pycopy!(matplotlib, pyimport("matplotlib"))
@@ -159,7 +159,7 @@ function __init__()
159159
global backend = backend_gui[1]
160160
global gui = backend_gui[2]
161161
if Sys.isapple() && gui == :tk
162-
@warn "PyPlot is using tkagg backend, which is known to cause crashes on MacOS (#410); use the MPLBACKEND environment variable to request a different backend."
162+
@warn "PythonPlot is using tkagg backend, which is known to cause crashes on MacOS (#410); use the MPLBACKEND environment variable to request a different backend."
163163
end
164164

165165
PythonCall.pycopy!(plt, pyimport("matplotlib.pyplot")) # raw Python module

src/plot3d.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Base.hasproperty(m::LazyPyModule, x::Symbol) = PyCall.hasproperty(Py(m), x)
1616
Base.propertynames(m::LazyPyModule) = propertynames(Py(m))
1717

1818
###########################################################################
19-
# Lazily load mplot3d modules. This (slightly) improves load time of PyPlot,
20-
# and it also allows PyPlot to load on systems where mplot3d is not installed.
19+
# Lazily load mplot3d modules. This (slightly) improves load time of PythonPlot,
20+
# and it also allows PythonPlot to load on systems where mplot3d is not installed.
2121

2222
const axes3D = LazyPyModule("mpl_toolkits.mplot3d.axes3d")
2323
const art3D = LazyPyModule("mpl_toolkits.mplot3d.art3d")

test/runtests.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ENV["MPLBACKEND"]="agg" # no GUI
22

33
using PythonPlot, PythonCall, Test
44

5-
@info("PyPlot is using Matplotlib $(PyPlot.version) with Python $(PyCall.pyversion)")
5+
@info("PythonPlot is using Matplotlib $(PythonPlot.version) with Python $(PyCall.pyversion)")
66

77
plot(1:5, 2:6, "ro-")
88

@@ -11,15 +11,15 @@ line = gca().lines[1]
1111
@test line.get_ydata() == [2:6;]
1212

1313
fig = gcf()
14-
@test isa(fig, PyPlot.Figure)
15-
if PyPlot.version >= v"2"
14+
@test isa(fig, PythonPlot.Figure)
15+
if PythonPlot.version >= v"2"
1616
@test fig.get_size_inches() [6.4, 4.8]
1717
else # matplotlib 1.3
1818
@test fig.get_size_inches() [8, 6]
1919
end
2020

2121
# with Matplotlib 1.3, I get "UserWarning: bbox_inches option for ps backend is not implemented yet"
22-
if PyPlot.version >= v"2"
22+
if PythonPlot.version >= v"2"
2323
s = sprint(show, "application/postscript", fig);
2424
# m = match(r"%%BoundingBox: *([0-9]+) +([0-9]+) +([0-9]+) +([0-9]+)", s)
2525
m = match(r"%%BoundingBox: *([0-9]+\.?[0-9]*) +([0-9]+\.?[0-9]*) +([0-9]+\.?[0-9]*) +([0-9]+\.?[0-9]*)", s)
@@ -31,7 +31,7 @@ end
3131

3232
c = get_cmap("RdBu")
3333
a = 0.0:0.25:1.0
34-
rgba = PyArray(pycall(PyPlot.ScalarMappable; cmap=c, norm=PyPlot.Normalize01).to_rgba(a))
34+
rgba = PyArray(pycall(PythonPlot.ScalarMappable; cmap=c, norm=PythonPlot.Normalize01).to_rgba(a))
3535
@test rgba [ 0.403921568627451 0.0 0.12156862745098039 1.0
3636
0.8991926182237601 0.5144175317185697 0.4079200307574009 1.0
3737
0.9657054978854287 0.9672433679354094 0.9680891964628989 1.0

0 commit comments

Comments
 (0)