【问题标题】:matplotlib: change position of rectangle by slidermatplotlib:通过滑块改变矩形的位置
【发布时间】:2018-08-06 09:36:27
【问题描述】:

我正在尝试通过更改滑块来更改绘制矩形的 xy 位置。我为椭圆实现了这一点,但对于矩形它不起作用。我不知道为什么?!

matplotlib widgets slider on object (Ellipse)

【问题讨论】:

    标签: object matplotlib widget slider rectangles


    【解决方案1】:

    Rectangle 没有.center

    尝试使用

    def update(val):
        Spiegel.set_xy((val,0))
    

    【讨论】:

      猜你喜欢
      • 2018-12-24
      • 1970-01-01
      • 1970-01-01
      • 2019-02-26
      • 1970-01-01
      • 2020-09-15
      • 2012-06-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多