I began to study python in order to write one small application for displaying graphical data, looked for different material on the language and faced with a lack of literature on working with graphics in this language, but I know that it is implemented. Tell me, please, the literature on configuring and displaying graphical data.

So far, I need to write an application of interest to me in a fairly short time, and then I will understand the language more deeply.


The next task is to display a window with text and two buttons, when you click one, display graphics data (ie, draw a picture by dots), and when you click another, display text data. And the return button to the original window. That's all.

I would like to solve it with python tools.

  • for some reason everyone decided that you need to issue GRAPHICS. Specify which one you want to solve the problem. - rnd_d

5 answers 5

Find the graphics.py library. It contains TK-based primitives that already exist in the language.

    If we are to do it quite simply, then I would choose PyQt4. 3 lines of code - the rest can be completed on styleSheet as in html ...

    #!/usr/bin/python # -*- coding: cp1251 -*- from PyQt4 import QtCore,QtGui app = QtGui.QApplication([]) label = QtGui.QLabel("img src='1.png'") #если знать размер картинки label.resize(100,100) label.show() app.exec_() 

      Matplotlib link text

        Matplotlib is the standard choice. And besides, graphs and charts:

        You can take what seems simpler and see examples in the documentation.

          List of Python GUI . PyQt, for example, is sure to allow and not that. From this list, probably EasyGui is the easiest option. But I do not know if she can draw graphics. True, you can make "feint ears": draw a picture and shove it into the standard window.

          UPD And matplotlib, by the way, allows you to place navigation buttons , and tex is not a problem to draw

          • one
            My God ... why do I need graphics)) I need to draw a heart in the window one button at a time, the text is done in another) Although you can calculate it so that the graph is a heart. In general, what other ways of implementation can you see for such a program? I just need to express my sympathy for a person in this way. ) - Takizka
          • Then you don't need Python, but CHM will do. A version with EasyGui also solves this problem. In both cases, the heart is just a picture, which is made by pens in Paint, for example. - yapycoder
          • 2
            By the way, a good idea :) mathworld.wolfram.com/HeartCurve.html - yapycoder
          • I don’t know what an easier tickle can be for graphics in Python. - yapycoder
          • For personal reasons, do it better on python. ) Otherwise I would not ask such a strange question. Thank you all for the ideas, I study. ) - Takizka