moved stuff to PlotDocs
This commit is contained in:
parent
91ec0ad077
commit
853cda4b80
@ -101,16 +101,3 @@ const _arg_desc = KW(
|
||||
:foreground_color_guide => "Color Type or `:match` (matches `:foreground_color_subplot`). Color of axis guides (axis labels).",
|
||||
|
||||
)
|
||||
|
||||
# need dataframes to make html tables, etc easily
|
||||
if is_installed("DataFrames")
|
||||
@eval begin
|
||||
import DataFrames
|
||||
|
||||
function save_html(df::DataFrames.AbstractDataFrame, fn = "/tmp/tmp.html")
|
||||
f = open(fn, "w")
|
||||
writemime(f, MIME("text/html"), df)
|
||||
close(f)
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -159,8 +159,10 @@ function backend(modname::Symbol)
|
||||
CURRENT_BACKEND.pkg = _backend_instance(modname)
|
||||
end
|
||||
|
||||
const _deprecated_backends = [:qwt, :winston, :bokeh, :gadfly, :immerse]
|
||||
|
||||
function warn_on_deprecated_backend(bsym::Symbol)
|
||||
if bsym in (:qwt, :winston, :bokeh, :gadfly, :immerse)
|
||||
if bsym in _deprecated_backends
|
||||
warn("Backend $bsym has been deprecated. It may not work as originally intended.")
|
||||
end
|
||||
end
|
||||
|
||||
@ -7,19 +7,6 @@ type PlotExample
|
||||
exprs::Vector{Expr}
|
||||
end
|
||||
|
||||
function pretty_print_expr(io::IO, expr::Expr)
|
||||
lines = split(string(expr), "\n")
|
||||
start_idx = 1
|
||||
if expr.head == :block
|
||||
lines = lines[2:end-1]
|
||||
start_idx = 5
|
||||
end
|
||||
lines_without_comments = map(str -> split(str,"#")[1][start_idx:end], lines)
|
||||
for line in lines_without_comments
|
||||
println(io, expr)
|
||||
end
|
||||
end
|
||||
|
||||
# the _examples we'll run for each
|
||||
const _examples = PlotExample[
|
||||
|
||||
|
||||
41
src/utils.jl
41
src/utils.jl
@ -620,47 +620,6 @@ end
|
||||
|
||||
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# ---------------------------------------------------------------
|
||||
# graphs detailing the features that each backend supports
|
||||
|
||||
function supportGraph(allvals, func)
|
||||
vals = reverse(sort(allvals))
|
||||
bs = sort(backends())
|
||||
x, y = map(string, bs), map(string, vals)
|
||||
nx, ny = map(length, (x,y))
|
||||
z = zeros(nx, ny)
|
||||
for i=1:nx, j=1:ny
|
||||
supported = func(Plots._backend_instance(bs[i]))
|
||||
z[i,j] = float(vals[j] in supported) * (0.4i/nx+0.6)
|
||||
end
|
||||
heatmap(x, y, z,
|
||||
color = ColorGradient([:white, :darkblue]),
|
||||
line = (1, :black),
|
||||
leg = false,
|
||||
size = (50nx+50, 35ny+100),
|
||||
xlim = (0.5, nx+0.5),
|
||||
ylim = (0.5, ny+0.5),
|
||||
xrotation = 60,
|
||||
aspect_ratio = :equal)
|
||||
end
|
||||
|
||||
supportGraphArgs() = supportGraph(_all_args, supportedArgs)
|
||||
supportGraphTypes() = supportGraph(_allTypes, supportedTypes)
|
||||
supportGraphStyles() = supportGraph(_allStyles, supportedStyles)
|
||||
supportGraphMarkers() = supportGraph(_allMarkers, supportedMarkers)
|
||||
supportGraphScales() = supportGraph(_allScales, supportedScales)
|
||||
supportGraphAxes() = supportGraph(_allAxes, supportedAxes)
|
||||
|
||||
function dumpSupportGraphs()
|
||||
for func in (supportGraphArgs, supportGraphTypes, supportGraphStyles,
|
||||
supportGraphMarkers, supportGraphScales, supportGraphAxes)
|
||||
plt = func()
|
||||
png(Pkg.dir("PlotDocs", "docs", "examples", "img", "supported", "$(string(func))"))
|
||||
end
|
||||
end
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user