qwt subplots
This commit is contained in:
parent
51e8f3ff6e
commit
48d802fc40
File diff suppressed because one or more lines are too long
@ -147,7 +147,7 @@ function updateLimsAndTicks(plt::Plot{QwtPackage}, d::Dict, isx::Bool)
|
||||
w = plt.o.widget
|
||||
axisid = Qwt.QWT.QwtPlot[isx ? :xBottom : :yLeft]
|
||||
|
||||
if typeof(lims) <: Tuple
|
||||
if typeof(lims) <: @compat(Union{Tuple,AVec}) && length(lims) == 2
|
||||
if isx
|
||||
plt.o.autoscale_x = false
|
||||
else
|
||||
@ -249,15 +249,35 @@ end
|
||||
function buildSubplotObject!(subplt::Subplot{QwtPackage})
|
||||
i = 0
|
||||
rows = []
|
||||
for rowcnt in subplt.layout.rowcounts
|
||||
push!(rows, Qwt.hsplitter([plt.o for plt in subplt.plts[(1:rowcnt) + i]]...))
|
||||
i += rowcnt
|
||||
row = []
|
||||
for (i,(r,c)) in enumerate(subplt.layout)
|
||||
push!(row, subplt.plts[i].o)
|
||||
if c == ncols(subplt.layout, r)
|
||||
push!(rows, Qwt.hsplitter(row...))
|
||||
row = []
|
||||
end
|
||||
end
|
||||
# for rowcnt in subplt.layout.rowcounts
|
||||
# push!(rows, Qwt.hsplitter([plt.o for plt in subplt.plts[(1:rowcnt) + i]]...))
|
||||
# i += rowcnt
|
||||
# end
|
||||
subplt.o = Qwt.vsplitter(rows...)
|
||||
Qwt.resizewidget(subplt.o, subplt.initargs[1][:size]...)
|
||||
Qwt.moveToLastScreen(subplt.o) # hack so it goes to my center monitor... sorry
|
||||
end
|
||||
|
||||
function handleLinkInner(plt::Plot{QwtPackage}, isx::Bool)
|
||||
warn("handleLinkInner isn't implemented for qwt")
|
||||
end
|
||||
|
||||
function expandLimits!(lims, plt::Plot{QwtPackage}, isx::Bool)
|
||||
for series in plt.o.lines
|
||||
expandLimits!(lims, isx ? series.x : series.y)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
|
||||
function Base.writemime(io::IO, ::MIME"image/png", plt::PlottingObject{QwtPackage})
|
||||
|
||||
@ -122,6 +122,7 @@ function linkAxis(subplt::Subplot, isx::Bool)
|
||||
expandLimits!(lims, plt, isx)
|
||||
end
|
||||
|
||||
@show lims
|
||||
for plt in subplt.plts
|
||||
(isx ? xlims! : ylims!)(plt, lims...)
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user