PySimpleGUI / PySimpleGUI/PySimpleGUI

[Question]: Matplotlib + PySimpleGUIQt in the Main Window

Abierto
#5,373 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Matplotlib Port - Qt Question
Lenguaje dominante
Python
Estrellas
13.8k
Forks
1.8k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Matplotlib + PySimpleGUIQt in the Main Window

Operating System

Windows 10

PySimpleGUI Port (tkinter, Qt, Wx, Web)

PySimpleGuiQt


Versions

Version information can be obtained by calling sg.main_get_debug_data()
Or you can print each version shown in ()

Python version (sg.sys.version)

3.7

PySimpleGUI Version (sg.__version__)

4.59 (for PySimpleGUI)
0.35 (for PySimpleGUIQt)

GUI Version (tkinter (sg.tclversion_detailed), PySide2, WxPython, Remi)

5.13.2 (for PySide2)


Your Experience In Months or Years (optional)

Years Python programming experience

Years Programming experience overall

Have used another Python GUI Framework? (tkinter, Qt, etc) (yes/no is fine)

I have used a little of PyQt5 before

Anything else you think would be helpful?


Troubleshooting

These items may solve your problem. Please check those you've done by changing - [ ] to - [X]

  • Searched main docs for your problem www.PySimpleGUI.org
  • Looked for Demo Programs that are similar to your goal Demos.PySimpleGUI.org
  • If not tkinter - looked for Demo Programs for specific port
  • For non tkinter - Looked at readme for your specific port if not PySimpleGUI (Qt, WX, Remi)
  • Run your program outside of your debugger (from a command line)
  • Searched through Issues (open and closed) to see if already reported Issues.PySimpleGUI.org
  • Tried using the PySimpleGUI.py file on GitHub. Your problem may have already been fixed but not released
Detailed Description

I originally had created a small GUI in the tkinter port (PySimpleGUI), but found out later that background images were a bit difficult to implement. I saw the demo program but was not crazy about the look of it. I instead have been attempting to switch to the PySimpleGUIQt port because I like how it can implement a background image, and it looks cleaner. After some trial and error I was able to plot with matplotlib by using the Image widget. Seems to work, but was curious if there were other ways to plot using PySimpleGUIQt. For example, in the tkinter port it has the sg.Canvas() ability. I haven't had any luck though using the Canvas in the qt port, (because it is not allowed in the Qt port I guess).

I would like to plot using matplotlib (could be simple graph, or 2D filled contour plot) in the main window. Like I mentioned I was able to use the sg.Image() function to create a plot when a button was hit through the demo: "Demo_Matplotlib_Image_Elem.py". However, I have found it hard to find information on plotting specifically for the qt port. Almost all the demos/questions are for the tkinter port. Is the sg.Image() widget the only way to currently plot using Matplotlib into the main window for the qt port? Any guidance would be much appreciated, thanks!

Code To Duplicate

A short program that isolates and demonstrates the problem (Do not paste your massive program, but instead 10-20 lines that clearly show the problem)

This pre-formatted code block is all set for you to paste in your bit of code:


# Paste your code here


Screenshot, Sketch, or Drawing

Watcha Makin?

If you care to share something about your project, it would be awesome to hear what you're building.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza con Demo_Matplotlib_Image_Elem.py e inspecciona cómo sg.Image() incrusta el gráfico en una ventana. Compara ese enfoque con el sg.Canvas() del port de Qt y con otros ejemplos de Qt; después, determina si se debería documentar o añadir una ruta de plotting compatible en la ventana principal.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
matplotlib, python
Área
data-visualization, desktop
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
20/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.