suppose I want to track the ratings of seasons of a TV show. so there are three columns of data-season number, year, and ratings. I want the year and ratings on the axes and season number as labels on the points. how can this be achieved considering visualization tools only take in values for X and Y axes?


2 Answers 2


Have a look at matplotlib's annotate.

Here are some examples. I believe it works well with seaborn too.


I am assuming the tv show ratings of a season changes as time passes. If you are using a library called Pandas there is a function called groupby, which helps you to group certain columns of a dataframe and form a new dataframe.

To import pandas

import pandas as pd

Groupby syntax

New_dataframe=old.groupby("Year")["Season Number"].function_you_want_to_use()

If stacked is true the bars will will be on top of one another.

This image is just an example from another dataset

I don't have your exact data. So consider
the x axis as year
the y axis as ratings
labels as season number(example S1-blue, S2-orange, S3-green)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.