File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -2,20 +2,21 @@ ENV["MPLBACKEND"]="agg" # no GUI
22
33using PythonPlot, PythonCall, Test
44
5- @info (" PythonPlot is using Matplotlib $(PythonPlot. version) with Python $(PyCall. pyversion) " )
5+ pyversion = pyconvert (String, pyimport (" sys" ). version)
6+ @info (" PythonPlot is using Matplotlib $(PythonPlot. version) with Python $pyversion " )
67
78plot (1 : 5 , 2 : 6 , " ro-" )
89
9- line = gca (). lines[1 ]
10- @test line. get_xdata () == [ 1 : 5 ;]
11- @test line. get_ydata () == [ 2 : 6 ;]
10+ line = gca (). lines[0 ]
11+ @test PyArray ( line. get_xdata ()) == 1 : 5
12+ @test PyArray ( line. get_ydata ()) == 2 : 6
1213
1314fig = gcf ()
1415@test isa (fig, PythonPlot. Figure)
1516if PythonPlot. version >= v " 2"
16- @test fig. get_size_inches () ≈ [6.4 , 4.8 ]
17+ @test PyArray ( fig. get_size_inches () ) ≈ [6.4 , 4.8 ]
1718else # matplotlib 1.3
18- @test fig. get_size_inches () ≈ [8 , 6 ]
19+ @test PyArray ( fig. get_size_inches () ) ≈ [8 , 6 ]
1920end
2021
2122# with Matplotlib 1.3, I get "UserWarning: bbox_inches option for ps backend is not implemented yet"
You can’t perform that action at this time.
0 commit comments