Graphics (drawing by points) in Python

I started studying python in order to write one small application for the output of graphical data, I searched for different materials on the language and was faced with a lack of literature on working with graphics in this language, but I know that it is implemented. Please tell me the literature on configuring and displaying graphical data.

For now, I need to write the application I'm interested in in a fairly short time, and then I will understand more deeply about the language.


The task is as follows: to display a window with text and two buttons, to display graphic data (i.e. drawing a drawing by points) when one button is clicked, and to display text data when the other button is clicked. And a button to return to the original window. That's it.

I would like to solve it with python tools.

Author: Takizka, 2011-05-17

5 answers

Find the library graphics.py it contains primitives based on TK, which is already in the language

 1
Author: Ufian, 2011-05-19 22:35:38

If we do it quite simply, then I would choose PyQt4. 3 lines of code - the rest can be done 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_()
 1
Author: Александр Молофеев, 2011-08-03 10:45:56

Matplotlib link text

 0
Author: BugHunter, 2011-05-17 23:51:44

Matplotlib - standard selection. And in addition, graphs and charts:

You can take something that seems simpler, and look at the examples in the documentation.

 0
Author: Nicolas Chabanovsky, 2011-05-18 05:43:39

The list Python GUI. PyQt, for example, I'm sure it will allow something else. From this list, probably EasyGui is the easiest option. But I don't know if she can draw graphs. However, you can do a "feint with your ears": draw a picture and shove it into a standard window.

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

 0
Author: yapycoder, 2011-05-18 12:47:57