removed plotly-latest.min.js and added build.jl which downloads it; fix for quiver_using_hack; working on pyplot display behavior

This commit is contained in:
Thomas Breloff 2016-06-09 11:44:05 -04:00
parent 7248d8d7ce
commit 45a1ed69d4
4 changed files with 24 additions and 71 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@
.DS_Store .DS_Store
examples/.ipynb_checkpoints/* examples/.ipynb_checkpoints/*
examples/meetup/.ipynb_checkpoints/* examples/meetup/.ipynb_checkpoints/*
deps/plotly-latest.min.js

File diff suppressed because one or more lines are too long

View File

@ -72,20 +72,20 @@ function _initialize_backend(::PyPlotBackend)
PyPlot.ioff() PyPlot.ioff()
if !isa(Base.Multimedia.displays[end], Base.REPL.REPLDisplay) # if !isa(Base.Multimedia.displays[end], Base.REPL.REPLDisplay)
PyPlot.ioff() # stops wierd behavior of displaying incomplete graphs in IJulia # PyPlot.ioff() # stops wierd behavior of displaying incomplete graphs in IJulia
# # TODO: how the hell can I use PyQt4?? # # # TODO: how the hell can I use PyQt4??
# "pyqt4"=>:qt_pyqt4 # # "pyqt4"=>:qt_pyqt4
# PyPlot.backend[1] = "pyqt4" # # PyPlot.backend[1] = "pyqt4"
# PyPlot.gui[1] = :qt_pyqt4 # # PyPlot.gui[1] = :qt_pyqt4
# PyPlot.switch_backend("Qt4Agg") # # PyPlot.switch_backend("Qt4Agg")
# only turn on the gui if we want it # # only turn on the gui if we want it
if PyPlot.gui != :none # if PyPlot.gui != :none
PyPlot.pygui(true) # PyPlot.pygui(true)
end # end
end # end
end end
# -------------------------------------------------------------------------------------- # --------------------------------------------------------------------------------------
@ -1196,20 +1196,15 @@ end
# ----------------------------------------------------------------- # -----------------------------------------------------------------
# display/output # display/output
# function Base.display(::PlotsDisplay, plt::Plot{PyPlotBackend})
# finalizePlot(plt)
# if isa(Base.Multimedia.displays[end], Base.REPL.REPLDisplay)
# display(getfig(plt.o))
# end
# getfig(plt.o)[:show]()
# end
function _display(plt::Plot{PyPlotBackend}) function _display(plt::Plot{PyPlotBackend})
# finalizePlot(plt) # if isa(Base.Multimedia.displays[end], Base.REPL.REPLDisplay)
if isa(Base.Multimedia.displays[end], Base.REPL.REPLDisplay) # display(plt.o)
display(getfig(plt.o)) # end
end # PyPlot.ion()
getfig(plt.o)[:show]() PyPlot.pygui(false)
plt.o[:show]()
PyPlot.pygui(true)
# PyPlot.ioff()
end end
@ -1225,10 +1220,8 @@ const _pyplot_mimeformats = Dict(
for (mime, fmt) in _pyplot_mimeformats for (mime, fmt) in _pyplot_mimeformats
# @eval function Base.writemime(io::IO, ::MIME{Symbol($mime)}, plt::Plot{PyPlotBackend})
@eval function _writemime(io::IO, ::MIME{Symbol($mime)}, plt::Plot{PyPlotBackend}) @eval function _writemime(io::IO, ::MIME{Symbol($mime)}, plt::Plot{PyPlotBackend})
# finalizePlot(plt) fig = plt.o
fig = getfig(plt.o)
fig.o["canvas"][:print_figure]( fig.o["canvas"][:print_figure](
io, io,
format=$fmt, format=$fmt,

View File

@ -754,8 +754,8 @@ end
# function apply_series_recipe(d::KW, ::Type{Val{:quiver}}) # function apply_series_recipe(d::KW, ::Type{Val{:quiver}})
function quiver_using_hack(d::KW) function quiver_using_hack(d::KW)
label := "" d[:label] = ""
seriestype := :shape d[:seriestype] = :shape
velocity = error_zipit(d[:quiver]) velocity = error_zipit(d[:quiver])
xorig, yorig = d[:x], d[:y] xorig, yorig = d[:x], d[:y]