Solution 1: Matplotlib for Data Visualization
Let’s look at the solution to the above challenge.
We'll cover the following
Instructions
- Use
plt.figure()
and create a figure object, say fig. - Add an axis to the figure canvas (
fig
).
The values of [left, bottom, width, height]
are [0,0,1,1]
.
To finish this task, follow these steps:
- Use
add_axes()
- Plot the data
x
,y
on the axes. - Set the labels
x
andy
. - Set the title.
- Create legends as shown in the plot.
Write a code to create a figure which matches the figure below:
Get hands-on with 1400+ tech skills courses.