Week 14 — Lesson 2: Plotly charts people can zoom

2 min

In Week 5 you saved PNG charts with matplotlib. A PNG is a picture: a NorthPeak technician who sees a spike in December cannot zoom on it. Plotly draws the chart in the browser, where the user can zoom and hover, and one line puts it in your Streamlit page. This lesson covers plotly.express, the Figure object, date parsing, and the problem of two signals on one axis.

Plotly instead of matplotlib

In Week 5 you saved PNG files with matplotlib. A PNG is a picture. A technician who sees a spike in December cannot zoom on it. Plotly draws the chart in the browser. Moving the mouse shows the exact date and value. Dragging a box zooms in. Double-clicking zooms out. Nothing to code: the chart does it.

Preview — the rest of the lesson is for enrolled readers.

Already enrolled with a code?

Your access is tied to your account, not to this link. Sign in with the same email you used in class: your course is waiting, no need to enter the code again.

Sign inNo account yet? Create one
This lesson is part of the “Week 14 — Diagnostic application integration” module

The first modules of the course are open to everyone. For the rest you have three options: buy this course once and for all, subscribe, or enter the code handed out in class.

Are you a student on this course?

The code is tied to your account: sign in or create an account and it will be applied automatically when you come back.

No account yet? Create one