def _update_plot_views(self):
## view has resized; update auxiliary views to match
self._right_axis.setGeometry(self._plot_item.vb.sceneBoundingRect())
self._top_axis.setGeometry(self._plot_item.vb.sceneBoundingRect())
## need to re-update linked axes since this was called
## incorrectly while views had different shapes.
## (probably this should be handled in ViewBox.resizeEvent)
self._right_axis.linkedViewChanged(self._plot_item.vb, self._right_axis.XAxis)
self._top_axis.linkedViewChanged(self._plot_item.vb, self._top_axis.YAxis)
评论列表
文章目录