mu-editor / mu

A small, simple editor for beginner Python programmers. Written in Python and Qt5.
http://codewith.mu
GNU General Public License v3.0
1.4k stars 434 forks source link

Plotter is not working. There is no graph. #2516

Open roboticsware opened 1 month ago

roboticsware commented 1 month ago

What were you trying to do?

I tried to use the Plotter.

What steps did you take to trigger the issue?

The code is very simple. It's origin from the tutorial, https://codewith.mu/en/tutorials/1.2/plotter. I just want to know the Plotter work or not.

from time import sleep
import random

while True:
    print(random.randint(0, 100))
    sleep(0.1)

When I tuned on the Plotter with the code above on the on both Python 3 and Pico mode, there is no graph.

What did you expect to happen?

The graph should be shown like the tutorial.

What actually happened?

When I tuned on the Plotter with the code above on the on both Python 3 and Pico mode, there is no graph.

Operating System Version

Both MacOS 10.15.7 and Windows 10

Mu Version

1.2.0

Other Info

No response

Editor Log

No response

carlosperate commented 1 month ago

Hi @roboticsware,

The plotter needs a tuple to be printed so you need to change the print argument:

- print(random.randint(0, 100))
+ print((random.randint(0, 100),))