Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matplotlib exercise 3 #4

Open
T-Atalaia opened this issue May 27, 2024 · 1 comment
Open

Matplotlib exercise 3 #4

T-Atalaia opened this issue May 27, 2024 · 1 comment

Comments

@T-Atalaia
Copy link

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.

@majkah0
Copy link
Contributor

majkah0 commented Jun 20, 2024

Solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants