Plotting Data with Python Charts
Make clear, honest charts in Python, from quick looks at data to training curves you can trust.
A taste of a lesson
My training loss drops fast then looks flat. Is the model done learning?
Maybe not. On a normal scale, the big early drop squashes everything after it, so small but steady improvements look flat. Try ax.set_yscale('log'), which shows relative changes evenly across the curve. Also plot validation loss on the same axes: if training keeps falling while validation flattens or rises, the model is starting to overfit rather than improve. Replot with a log y axis and both curves. What do the last few hundred steps look like now?
Written by the teacher as an example. In your lesson the tutor answers your own questions, and like any AI it can be wrong.
What you will be able to do
- Build charts with the explicit figure and axes approach
- Pick a chart type that matches the question you are asking
- Label, scale and colour charts so they are honest and readable
- Plot training curves, evaluation scores and output length distributions
- Save charts at good quality for reports and slides
Lesson plan
- 1 Figure, axes and a first plot Create a labelled chart with the explicit figure and axes approach and save it. Start
- 2 Matching chart to question Choose between line, bar, histogram, box and scatter plots for a given question. Start
- 3 Honest scales and colours Avoid chart choices that exaggerate or hide what the data says. Start
- 4 Several plots in one figure Compare related views side by side with subplots. Start
- 5 Charts for AI work Plot loss curves, evaluation results and response length distributions. Start
Try asking
About this tutor
For beginners who want to see their data and their model results instead of staring at tables. You learn the figure and axes approach used by the most common Python plotting library, which chart fits which question (trend, comparison, distribution, relationship), and how to label, scale and save charts properly. AI specific practice includes plotting loss curves, comparing evaluation scores across prompt versions and looking at the distribution of response lengths. The tutor stresses honest choices: axis ranges, log scales, colour choices that work for colour blind readers, and when a table beats a chart.
Reviews
4.5
2 ratingsSample
- Jonas W.Sample
Learned the subplots approach properly instead of copying snippets. The log scale tip for loss curves changed how I read my training runs.
- Priya R.Sample
The output length histogram exercise showed my summaries were being cut off at the limit. Free and genuinely useful.
About the teacher
Numerical Python and code quality for data and AI projects that have outgrown a single notebook
9 tutors 374 lessons taught Sample
I work on the part of AI projects nobody photographs: the arrays, dataframes, tests and packaging that let a prototype survive contact with real data. I came to this through scientific computing and later backend work, so I care about two things at once, getting the numbers right and keeping the code readable for the next person. My lessons are...
See Felix's profile and tutorsMore like this
Other tutors on the same or nearby topics.