working on immerse
This commit is contained in:
parent
51e38c80d8
commit
dc1389bd1a
@ -61,17 +61,20 @@ end
|
|||||||
|
|
||||||
# -------------------------------
|
# -------------------------------
|
||||||
|
|
||||||
# create the underlying object
|
# create my Compose.Context grid by hstacking and vstacking the Gadfly.Plot objects
|
||||||
function buildSubplotObject!(::ImmersePackage, subplt::Subplot)
|
function buildGadflySubplotContext(subplt::Subplot)
|
||||||
|
|
||||||
# create my Compose.Context grid by hstacking and vstacking the Gadfly.Plot objects
|
|
||||||
i = 0
|
i = 0
|
||||||
rows = []
|
rows = []
|
||||||
for rowcnt in subplt.layout.rowcounts
|
for rowcnt in subplt.layout.rowcounts
|
||||||
push!(rows, Gadfly.hstack([plt.o[2] for plt in subplt.plts[(1:rowcnt) + i]]...))
|
push!(rows, Gadfly.hstack([plt.o[2] for plt in subplt.plts[(1:rowcnt) + i]]...))
|
||||||
i += rowcnt
|
i += rowcnt
|
||||||
end
|
end
|
||||||
gctx = Gadfly.vstack(rows...)
|
Gadfly.vstack(rows...)
|
||||||
|
end
|
||||||
|
|
||||||
|
# create the underlying object
|
||||||
|
function buildSubplotObject!(::ImmersePackage, subplt::Subplot)
|
||||||
|
gctx = buildGadflySubplotContext(subplt)
|
||||||
|
|
||||||
# save this for later
|
# save this for later
|
||||||
subplt.o = (nothing, gctx)
|
subplt.o = (nothing, gctx)
|
||||||
@ -87,16 +90,7 @@ function Base.display(::ImmersePackage, subplt::Subplot)
|
|||||||
subplt.o = (fig, gctx)
|
subplt.o = (fig, gctx)
|
||||||
end
|
end
|
||||||
|
|
||||||
# fig.prepped = Gadfly.render_prepare(gctx)
|
newfig = Immerse.Figure(fig.canvas)
|
||||||
# # Render in the current state
|
newfig.cc = buildGadflySubplotContext(subplt)
|
||||||
# fig.cc = render_finish(fig.prepped; dynamic=false)
|
display(newfig)
|
||||||
# # Render the figure
|
|
||||||
# display(fig.canvas, fig)
|
|
||||||
|
|
||||||
fig.cc = gctx
|
|
||||||
# fig.prepped = nothing
|
|
||||||
|
|
||||||
# display(fig.canvas, display(gctx))
|
|
||||||
|
|
||||||
display(fig)
|
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user