diff --git a/README.md b/README.md index d0ffd1ec..d18ac3ab 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Build Status](https://travis-ci.org/tbreloff/Plots.jl.svg?branch=master)](https://travis-ci.org/tbreloff/Plots.jl) [![Plots](http://pkg.julialang.org/badges/Plots_0.3.svg)](http://pkg.julialang.org/?pkg=Plots&ver=0.3) [![Plots](http://pkg.julialang.org/badges/Plots_0.4.svg)](http://pkg.julialang.org/?pkg=Plots&ver=0.4) -[![Coverage Status](https://coveralls.io/repos/tbreloff/Plots.jl/badge.svg?branch=master)](https://coveralls.io/r/tbreloff/Plots.jl?branch=master) + [![codecov.io](http://codecov.io/github/tbreloff/Plots.jl/coverage.svg?branch=master)](http://codecov.io/github/tbreloff/Plots.jl?branch=master) #### Author: Thomas Breloff (@tbreloff) diff --git a/docs/readme_template.md b/docs/readme_template.md index c41f1c7a..ce188f9f 100644 --- a/docs/readme_template.md +++ b/docs/readme_template.md @@ -3,7 +3,7 @@ [![Build Status](https://travis-ci.org/tbreloff/Plots.jl.svg?branch=master)](https://travis-ci.org/tbreloff/Plots.jl) [![Plots](http://pkg.julialang.org/badges/Plots_0.3.svg)](http://pkg.julialang.org/?pkg=Plots&ver=0.3) [![Plots](http://pkg.julialang.org/badges/Plots_0.4.svg)](http://pkg.julialang.org/?pkg=Plots&ver=0.4) -[![Coverage Status](https://coveralls.io/repos/tbreloff/Plots.jl/badge.svg?branch=master)](https://coveralls.io/r/tbreloff/Plots.jl?branch=master) + [![codecov.io](http://codecov.io/github/tbreloff/Plots.jl/coverage.svg?branch=master)](http://codecov.io/github/tbreloff/Plots.jl?branch=master) #### Author: Thomas Breloff (@tbreloff) diff --git a/img/supported/Plots.supportGraphArgs.png b/img/supported/Plots.supportGraphArgs.png index 10b70ae5..a19de0ca 100644 Binary files a/img/supported/Plots.supportGraphArgs.png and b/img/supported/Plots.supportGraphArgs.png differ diff --git a/img/supported/Plots.supportGraphAxes.png b/img/supported/Plots.supportGraphAxes.png index e4e37436..0ef203b5 100644 Binary files a/img/supported/Plots.supportGraphAxes.png and b/img/supported/Plots.supportGraphAxes.png differ diff --git a/img/supported/Plots.supportGraphMarkers.png b/img/supported/Plots.supportGraphMarkers.png index 1e4ee406..33a965e0 100644 Binary files a/img/supported/Plots.supportGraphMarkers.png and b/img/supported/Plots.supportGraphMarkers.png differ diff --git a/img/supported/Plots.supportGraphScales.png b/img/supported/Plots.supportGraphScales.png index 67067423..40b305ec 100644 Binary files a/img/supported/Plots.supportGraphScales.png and b/img/supported/Plots.supportGraphScales.png differ diff --git a/img/supported/Plots.supportGraphStyles.png b/img/supported/Plots.supportGraphStyles.png index acc3784b..b93aaa40 100644 Binary files a/img/supported/Plots.supportGraphStyles.png and b/img/supported/Plots.supportGraphStyles.png differ diff --git a/img/supported/Plots.supportGraphTypes.png b/img/supported/Plots.supportGraphTypes.png index dbeb711d..39ddf77a 100644 Binary files a/img/supported/Plots.supportGraphTypes.png and b/img/supported/Plots.supportGraphTypes.png differ diff --git a/src/backends/pyplot.jl b/src/backends/pyplot.jl index 01308117..a8fb6b98 100644 --- a/src/backends/pyplot.jl +++ b/src/backends/pyplot.jl @@ -25,7 +25,15 @@ function getPyPlotLineStyle(linetype::Symbol, linestyle::Symbol) end function getPyPlotMarker(marker::Shape) - marker.vertices + n = length(marker.vertices) + mat = zeros(n+1,2) + for (i,vert) in enumerate(marker.vertices) + mat[i,1] = vert[1] + mat[i,2] = vert[2] + end + mat[n+1,:] = mat[1,:] + pypath.pymember("Path")(mat) + # marker.vertices end # get the marker shape @@ -42,7 +50,7 @@ function getPyPlotMarker(marker::Symbol) marker == :pentagon && return "p" marker == :hexagon && return "h" marker == :octagon && return "8" - haskey(_shapes, marker) && return _shapes[marker].vertices + haskey(_shapes, marker) && return getPyPlotMarker(_shapes[marker]) warn("Unknown marker $marker") return "o" @@ -218,6 +226,7 @@ function plot!(pkg::PyPlotPackage, plt::Plot; kw...) extraargs[:linestyle] = getPyPlotLineStyle(lt, d[:linestyle]) extraargs[:marker] = getPyPlotMarker(d[:markershape]) + dump(extraargs[:marker]) if lt == :scatter extraargs[:s] = d[:markersize]^2 diff --git a/src/plotter.jl b/src/plotter.jl index 7e95ade1..8baececb 100644 --- a/src/plotter.jl +++ b/src/plotter.jl @@ -157,6 +157,7 @@ function backend() @eval import PyPlot @eval export PyPlot @eval const pycolors = PyPlot.pywrap(PyPlot.pyimport("matplotlib.colors")) + @eval const pypath = PyPlot.pywrap(PyPlot.pyimport("matplotlib.path")) # @eval const pycolorbar = PyPlot.pywrap(PyPlot.pyimport("matplotlib.colorbar")) if !isa(Base.Multimedia.displays[end], Base.REPL.REPLDisplay) PyPlot.ioff() diff --git a/test/runtests.jl b/test/runtests.jl index c2fe3606..47db71fb 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -49,8 +49,9 @@ facts("Gadfly") do # plot(x::AMat, y::AMat; kw...) # multiple lines (one per column of x/y... will assert size(x) == size(y)) @fact plot!(rand(10,3), rand(10,3)) --> not(nothing) - image_comparison_tests(:gadfly, skip=[4,19], eps=img_eps) - + if VERSION >= v"0.4-" + image_comparison_tests(:gadfly, skip=[4,19], eps=img_eps) + end end @@ -58,7 +59,7 @@ if VERSION >= v"0.4-" facts("PyPlot") do @fact pyplot() --> Plots.PyPlotPackage() @fact backend() --> Plots.PyPlotPackage() - image_comparison_tests(:pyplot, skip=[19], eps=img_eps) + image_comparison_tests(:pyplot, skip=[19,21], eps=img_eps) end end