Skip to content

Matplotlib exercise 3 #4

@T-Atalaia

Description

@T-Atalaia

At exercise 3, we have 2 issues

1 - The exercise never ask for a title for the graph, but checks for it on the asserts.

Lets visualize this plot that has the following instructions:

Use 'job_title' en 'salary_in_usd' from the ds_salaries dataset
set the figure to figsize=(15, 10)
create this specific plot with the following groupby:
data.groupby('job_title')['salary_in_usd'].apply(list), vert=False)
use plt.yticks(range(1, len(data['job_title'].unique()) + 1), data['job_title'].unique())
label x as 'Salary in USD'
label y as 'Salary Distribution by Job Title'

But in the asserts...

pc.assert_title_equal('Salary Distribution by Job Title'), "Did you put a title for your plot?"

2 - This is more an opinion. This exercise uses "groupby" which is a concept (as far as I recall) not adressed during the prep course. Although the expressions are given, it adds an extra layer of complexity, that goes out the scope of Matplotlib at that time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions