pyplot lims udpate fix
This commit is contained in:
parent
73bd3fa60c
commit
6aa4849266
@ -471,14 +471,19 @@ function Base.setindex!{X,Y}(plt::Plot{PyPlotPackage}, xy::Tuple{X,Y}, i::Intege
|
|||||||
end
|
end
|
||||||
|
|
||||||
ax = series[:axes]
|
ax = series[:axes]
|
||||||
if plt.plotargs[:xlims] == :auto
|
ax[:relim]()
|
||||||
xmin, xmax = ax[:get_xlim]()
|
ax[:autoscale]()
|
||||||
ax[:set_xlim](min(xmin, minimum(x)), max(xmax, maximum(x)))
|
if plt.plotargs[:xlims] != :auto
|
||||||
|
# xmin, xmax = ax[:get_xlim]()
|
||||||
|
# ax[:set_xlim](min(xmin, minimum(x)), max(xmax, maximum(x)))
|
||||||
|
addPyPlotLims(ax, plt.plotargs[:xlims], true)
|
||||||
end
|
end
|
||||||
if plt.plotargs[:ylims] == :auto
|
if plt.plotargs[:ylims] != :auto
|
||||||
ymin, ymax = ax[:get_ylim]()
|
# ymin, ymax = ax[:get_ylim]()
|
||||||
ax[:set_ylim](min(ymin, minimum(y)), max(ymax, maximum(y)))
|
# ax[:set_ylim](min(ymin, minimum(y)), max(ymax, maximum(y)))
|
||||||
|
addPyPlotLims(ax, plt.plotargs[:ylims], false)
|
||||||
end
|
end
|
||||||
|
PyPlot.draw()
|
||||||
|
|
||||||
plt
|
plt
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user