<tfoot id='sLvzU'></tfoot>
  • <small id='sLvzU'></small><noframes id='sLvzU'>

    <i id='sLvzU'><tr id='sLvzU'><dt id='sLvzU'><q id='sLvzU'><span id='sLvzU'><b id='sLvzU'><form id='sLvzU'><ins id='sLvzU'></ins><ul id='sLvzU'></ul><sub id='sLvzU'></sub></form><legend id='sLvzU'></legend><bdo id='sLvzU'><pre id='sLvzU'><center id='sLvzU'></center></pre></bdo></b><th id='sLvzU'></th></span></q></dt></tr></i><div id='sLvzU'><tfoot id='sLvzU'></tfoot><dl id='sLvzU'><fieldset id='sLvzU'></fieldset></dl></div>

      1. <legend id='sLvzU'><style id='sLvzU'><dir id='sLvzU'><q id='sLvzU'></q></dir></style></legend>

          <bdo id='sLvzU'></bdo><ul id='sLvzU'></ul>
      2. 如何在 kivy 中开始/使用 matplotlib

        时间:2023-10-10

          <i id='0HSc4'><tr id='0HSc4'><dt id='0HSc4'><q id='0HSc4'><span id='0HSc4'><b id='0HSc4'><form id='0HSc4'><ins id='0HSc4'></ins><ul id='0HSc4'></ul><sub id='0HSc4'></sub></form><legend id='0HSc4'></legend><bdo id='0HSc4'><pre id='0HSc4'><center id='0HSc4'></center></pre></bdo></b><th id='0HSc4'></th></span></q></dt></tr></i><div id='0HSc4'><tfoot id='0HSc4'></tfoot><dl id='0HSc4'><fieldset id='0HSc4'></fieldset></dl></div>
            <tbody id='0HSc4'></tbody>
          • <bdo id='0HSc4'></bdo><ul id='0HSc4'></ul>

                <tfoot id='0HSc4'></tfoot>

                  <legend id='0HSc4'><style id='0HSc4'><dir id='0HSc4'><q id='0HSc4'></q></dir></style></legend>

                  <small id='0HSc4'></small><noframes id='0HSc4'>

                1. 本文介绍了如何在 kivy 中开始/使用 matplotlib的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我最近学习了一点 matplotlib,并想在 kivy 中使用它.我在这里和那里阅读了一些关于花园的文件,但并不真正理解它.我已经安装了 kivy garden 和 matplotlib 但不知道如何从这里开始.我只是想将一个已经完成的 matplotlib 图添加到 kivy 中.我将不胜感激逐步简化的说明,说明如何将我已经编码到 kivy 中的内容并显示出来.谢谢

                  解决方案

                  这是 kivy-garden matplotlib 和 kivy 的最简单示例.如果您想做更高级的事情,请查看他们的示例:

                  I have recently learned a bit of matplotlib and would like to use it within kivy. I have read a little documentation on the garden here and there but don't really understand it. I have installed kivy garden and matplotlib but don't know how to proceed from here. I simply want to add a already completed matplotlib graph into kivy. I would appreciate a step by step simplified set of instructions of how to get what I already coded into kivy and get it to display. Thanks

                  解决方案

                  Here is the simplest example possible for kivy-garden matplotlib and kivy. If you would like to do more advanced things, check out their examples: https://github.com/kivy-garden/garden.matplotlib/tree/master/examples I think it should be enough to get you started with your plot.

                  Below I am adding it to a BoxLayout, you can add more widgets to this BoxLayout or add this BoxLayout somewhere else.

                  python code example.py:

                  from kivy.garden.matplotlib.backend_kivyagg import FigureCanvasKivyAgg
                  from kivy.app import App
                  from kivy.uix.boxlayout import BoxLayout
                  import matplotlib.pyplot as plt
                  
                  plt.plot([1, 23, 2, 4])
                  plt.ylabel('some numbers')
                  
                  class MyApp(App):
                  
                      def build(self):
                          box = BoxLayout()
                          box.add_widget(FigureCanvasKivyAgg(plt.gcf()))
                          return box
                  
                  MyApp().run()
                  

                  这篇关于如何在 kivy 中开始/使用 matplotlib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:用kivy制作时钟 下一篇:Python:如何在 RecycleView 中添加垂直滚动

                  相关文章

                  最新文章

                  <small id='3Lo6T'></small><noframes id='3Lo6T'>

                2. <i id='3Lo6T'><tr id='3Lo6T'><dt id='3Lo6T'><q id='3Lo6T'><span id='3Lo6T'><b id='3Lo6T'><form id='3Lo6T'><ins id='3Lo6T'></ins><ul id='3Lo6T'></ul><sub id='3Lo6T'></sub></form><legend id='3Lo6T'></legend><bdo id='3Lo6T'><pre id='3Lo6T'><center id='3Lo6T'></center></pre></bdo></b><th id='3Lo6T'></th></span></q></dt></tr></i><div id='3Lo6T'><tfoot id='3Lo6T'></tfoot><dl id='3Lo6T'><fieldset id='3Lo6T'></fieldset></dl></div>

                  <tfoot id='3Lo6T'></tfoot>

                    • <bdo id='3Lo6T'></bdo><ul id='3Lo6T'></ul>
                    1. <legend id='3Lo6T'><style id='3Lo6T'><dir id='3Lo6T'><q id='3Lo6T'></q></dir></style></legend>