tests
This commit is contained in:
parent
c28820f39c
commit
04a44a82c9
File diff suppressed because one or more lines are too long
@ -11,6 +11,7 @@
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"INFO: Recompiling stale cache file /home/tom/.julia/lib/v0.4/Colors.ji for module Colors.\n",
|
||||
"INFO: Recompiling stale cache file /home/tom/.julia/lib/v0.4/Plots.ji for module Plots.\n"
|
||||
]
|
||||
},
|
||||
@ -141,6 +142,114 @@
|
||||
"cols = distinguishable_colors(20)[2:end]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"image/svg+xml": [
|
||||
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n",
|
||||
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
||||
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
||||
"<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"\n",
|
||||
" width=\"95.0mm\" height=\"25.0mm\"\n",
|
||||
" shape-rendering=\"crispEdges\">\n",
|
||||
"<rect x=\"0.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#FFFF62\" stroke=\"none\" />\n",
|
||||
"<rect x=\"5.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#FF9FFF\" stroke=\"none\" />\n",
|
||||
"<rect x=\"10.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#00D6FF\" stroke=\"none\" />\n",
|
||||
"<rect x=\"15.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#D74400\" stroke=\"none\" />\n",
|
||||
"<rect x=\"20.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#008029\" stroke=\"none\" />\n",
|
||||
"<rect x=\"25.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#005FD5\" stroke=\"none\" />\n",
|
||||
"<rect x=\"30.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#930068\" stroke=\"none\" />\n",
|
||||
"<rect x=\"35.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#FFCBB5\" stroke=\"none\" />\n",
|
||||
"<rect x=\"40.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#A78600\" stroke=\"none\" />\n",
|
||||
"<rect x=\"45.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#00FFC5\" stroke=\"none\" />\n",
|
||||
"<rect x=\"50.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#007E86\" stroke=\"none\" />\n",
|
||||
"<rect x=\"55.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#534200\" stroke=\"none\" />\n",
|
||||
"<rect x=\"60.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#8C8793\" stroke=\"none\" />\n",
|
||||
"<rect x=\"65.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#680000\" stroke=\"none\" />\n",
|
||||
"<rect x=\"70.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#00005A\" stroke=\"none\" />\n",
|
||||
"<rect x=\"75.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#FF2C6F\" stroke=\"none\" />\n",
|
||||
"<rect x=\"80.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#F7FFF6\" stroke=\"none\" />\n",
|
||||
"<rect x=\"85.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#003D25\" stroke=\"none\" />\n",
|
||||
"<rect x=\"90.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#91ABFF\" stroke=\"none\" />\n",
|
||||
"</svg>"
|
||||
],
|
||||
"text/plain": [
|
||||
"19-element Array{ColorTypes.RGB{FixedPointNumbers.UfixedBase{UInt8,8}},1}:\n",
|
||||
" RGB{U8}(1.0,1.0,0.384) \n",
|
||||
" RGB{U8}(1.0,0.624,1.0) \n",
|
||||
" RGB{U8}(0.0,0.839,1.0) \n",
|
||||
" RGB{U8}(0.843,0.267,0.0) \n",
|
||||
" RGB{U8}(0.0,0.502,0.161) \n",
|
||||
" RGB{U8}(0.0,0.373,0.835) \n",
|
||||
" RGB{U8}(0.576,0.0,0.408) \n",
|
||||
" RGB{U8}(1.0,0.796,0.71) \n",
|
||||
" RGB{U8}(0.655,0.525,0.0) \n",
|
||||
" RGB{U8}(0.0,1.0,0.773) \n",
|
||||
" RGB{U8}(0.0,0.494,0.525) \n",
|
||||
" RGB{U8}(0.325,0.259,0.0) \n",
|
||||
" RGB{U8}(0.549,0.529,0.576)\n",
|
||||
" RGB{U8}(0.408,0.0,0.0) \n",
|
||||
" RGB{U8}(0.0,0.0,0.353) \n",
|
||||
" RGB{U8}(1.0,0.173,0.435) \n",
|
||||
" RGB{U8}(0.969,1.0,0.965) \n",
|
||||
" RGB{U8}(0.0,0.239,0.145) \n",
|
||||
" RGB{U8}(0.569,0.671,1.0) "
|
||||
]
|
||||
},
|
||||
"execution_count": 2,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# without specifying the background color, you get colors that are hard to see\n",
|
||||
"cols = distinguishable_colors(20)[2:end]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
@ -245,7 +354,115 @@
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# ugly, plus many similar, but at least you can see them\n",
|
||||
"# before the RGB conversion\n",
|
||||
"cols = distinguishable_colors(20,colorant\"white\")[2:end]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"image/svg+xml": [
|
||||
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n",
|
||||
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
|
||||
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
|
||||
"<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"\n",
|
||||
" width=\"95.0mm\" height=\"25.0mm\"\n",
|
||||
" shape-rendering=\"crispEdges\">\n",
|
||||
"<rect x=\"0.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#000000\" stroke=\"none\" />\n",
|
||||
"<rect x=\"5.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#C129E2\" stroke=\"none\" />\n",
|
||||
"<rect x=\"10.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#D14A00\" stroke=\"none\" />\n",
|
||||
"<rect x=\"15.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#088B00\" stroke=\"none\" />\n",
|
||||
"<rect x=\"20.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#0084C3\" stroke=\"none\" />\n",
|
||||
"<rect x=\"25.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#D2AB00\" stroke=\"none\" />\n",
|
||||
"<rect x=\"30.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#870036\" stroke=\"none\" />\n",
|
||||
"<rect x=\"35.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#FF8FA1\" stroke=\"none\" />\n",
|
||||
"<rect x=\"40.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#39FF6E\" stroke=\"none\" />\n",
|
||||
"<rect x=\"45.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#00008D\" stroke=\"none\" />\n",
|
||||
"<rect x=\"50.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#685200\" stroke=\"none\" />\n",
|
||||
"<rect x=\"55.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#00CED3\" stroke=\"none\" />\n",
|
||||
"<rect x=\"60.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#005042\" stroke=\"none\" />\n",
|
||||
"<rect x=\"65.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#7D747E\" stroke=\"none\" />\n",
|
||||
"<rect x=\"70.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#CEB6FF\" stroke=\"none\" />\n",
|
||||
"<rect x=\"75.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#95A087\" stroke=\"none\" />\n",
|
||||
"<rect x=\"80.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#FFAC79\" stroke=\"none\" />\n",
|
||||
"<rect x=\"85.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#FFFFA0\" stroke=\"none\" />\n",
|
||||
"<rect x=\"90.0mm\" y=\"0.0mm\"\n",
|
||||
" width=\"4.0mm\" height=\"25.0mm\"\n",
|
||||
" fill=\"#5E2200\" stroke=\"none\" />\n",
|
||||
"</svg>"
|
||||
],
|
||||
"text/plain": [
|
||||
"19-element Array{ColorTypes.RGB{FixedPointNumbers.UfixedBase{UInt8,8}},1}:\n",
|
||||
" RGB{U8}(0.0,0.0,0.0) \n",
|
||||
" RGB{U8}(0.757,0.161,0.886)\n",
|
||||
" RGB{U8}(0.82,0.29,0.0) \n",
|
||||
" RGB{U8}(0.031,0.545,0.0) \n",
|
||||
" RGB{U8}(0.0,0.518,0.765) \n",
|
||||
" RGB{U8}(0.824,0.671,0.0) \n",
|
||||
" RGB{U8}(0.529,0.0,0.212) \n",
|
||||
" RGB{U8}(1.0,0.561,0.631) \n",
|
||||
" RGB{U8}(0.224,1.0,0.431) \n",
|
||||
" RGB{U8}(0.0,0.0,0.553) \n",
|
||||
" RGB{U8}(0.408,0.322,0.0) \n",
|
||||
" RGB{U8}(0.0,0.808,0.827) \n",
|
||||
" RGB{U8}(0.0,0.314,0.259) \n",
|
||||
" RGB{U8}(0.49,0.455,0.494) \n",
|
||||
" RGB{U8}(0.808,0.714,1.0) \n",
|
||||
" RGB{U8}(0.584,0.627,0.529)\n",
|
||||
" RGB{U8}(1.0,0.675,0.475) \n",
|
||||
" RGB{U8}(1.0,1.0,0.627) \n",
|
||||
" RGB{U8}(0.369,0.133,0.0) "
|
||||
]
|
||||
},
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# after the RGB conversion\n",
|
||||
"cols = distinguishable_colors(20,colorant\"white\")[2:end]"
|
||||
]
|
||||
},
|
||||
|
||||
@ -3,8 +3,6 @@ julia 0.3
|
||||
Colors
|
||||
Reexport
|
||||
FactCheck
|
||||
PyPlot
|
||||
UnicodePlots
|
||||
Gadfly
|
||||
Images
|
||||
ImageMagick
|
||||
|
||||
@ -35,7 +35,7 @@ srand(1234)
|
||||
# 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=[19])
|
||||
image_comparison_tests(:gadfly, skip=[19], eps=1e-2)
|
||||
|
||||
end
|
||||
# catch err
|
||||
@ -83,16 +83,16 @@ srand(1234)
|
||||
# end
|
||||
|
||||
# try
|
||||
Pkg.installed("PyPlot")
|
||||
pyplot()
|
||||
backend()
|
||||
facts("PyPlot") do
|
||||
@fact backend(:pyplot) --> Plots.PyPlotPackage()
|
||||
@fact backend() --> Plots.PyPlotPackage()
|
||||
@fact typeof(plot(1:10)) --> Plots.Plot{Plots.PyPlotPackage}
|
||||
# Pkg.installed("PyPlot")
|
||||
# pyplot()
|
||||
# backend()
|
||||
# facts("PyPlot") do
|
||||
# @fact backend(:pyplot) --> Plots.PyPlotPackage()
|
||||
# @fact backend() --> Plots.PyPlotPackage()
|
||||
# @fact typeof(plot(1:10)) --> Plots.Plot{Plots.PyPlotPackage}
|
||||
|
||||
# image_comparison_tests(:pyplot, skip=[19])
|
||||
end
|
||||
# # image_comparison_tests(:pyplot, skip=[19])
|
||||
# end
|
||||
# catch err
|
||||
# warn("Skipped PyPlot due to: ", string(err))
|
||||
# end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user