mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
eslopfer
b1db3597f9
|
2 years ago | |
---|---|---|
.. | ||
README.md | 2 years ago |
README.md
Exercise 0: Environment and libraries
The exercise is validated if all questions of the exercise are validated
Activate the virtual environment. If you used conda
run conda activate your_env
Run python --version
Does it print Python 3.x
? x >= 8
Do import jupyter
, import numpy
, import pandas
, matplotlib
and plotly
run without any errors?
Exercise 1: Pandas plot 1
The exercise is validated if all questions of the exercise are validated
The solution of question 1 is accepted if the plot reproduces the plot in the image and respect those criteria.
Does it have a title?
Does it have a name on x-axis?
Does it have a legend?
Exercise 2: Pandas plot 2
For question 1, does the plot reproduce the plot in the image and respect the following criteria? It is important to observe that the older people are, the the more children they have.
Does it have a title?
Does it have a name on x-axis and y-axis?
Exercise 3: Matplotlib 1
For question 1, does the plot reproduce the plot in the image and respect those criteria?
Does it have a title?
Does it have a name on x-axis and y-axis?
Are the x-axis and y-axis limited to [1,8]?
Is the line a red dashdot line with a width of 3?
Are the circles blue circles with a size of 12?
Exercise 4: Matplotlib 2
For question 1, does the plot reproduce the plot in the image and respect those criteria?
Does it have a title?
Does it have a name on x-axis and y-axis?
Is the left data black?
Is the right data red?
https://matplotlib.org/gallery/api/two_scales.html
Exercise 5: Matplotlib subplots
For question 1, does the plot reproduces the plot in the image and respect those criteria?
Does it contain 6 subplots (2 rows, 3 columns)?
Does it have space between plots (hspace=0.5
and wspace=0.5
)?
Do all subplots contain a title: Title i
?
Do all subplots contain a text (2,3,i)
centered at (0.5, 0.5)
? Hint: check the parameter ha
of text
.
Have all subplots been created in a for loop?
Exercise 6: Plotly 1
The exercise is validated if all questions of the exercise are validated
For question 1, does the plot reproduce the plot in the image and respect those criteria?
Does it have the title?
Does it have a name on x-axis and y-axis?
For question 2, does the plot reproduce the plot in the image by using plotly.graph_objects
and respect those criteria?
Does it have a title?
Does it have a name on x-axis and y-axis?
Exercise 7: Plotly Box plots
For question 1, does the plot reproduce the plot in the image and respect those criteria? The code below shows a solution.
Does it have a title?
Does it have a legend?
import plotly.graph_objects as go
import numpy as np
y0 = np.random.randn(50)
y1 = np.random.randn(50) + 1 # shift mean
y2 = np.random.randn(50) + 2
fig = go.Figure()
fig.add_trace(go.Box(y=y0, name='Sample A',
marker_color = 'indianred'))
fig.add_trace(go.Box(y=y1, name = 'Sample B',
marker_color = 'lightseagreen'))
fig.show()