Say I have plotted one line for temperature change over time and another for the number of ice cream cones sold over the same time period in the same chart, how can I make use of two different y-axis scales, one on each side of the chart, using matplotlib?

When I Run the code above - ScriptPy returns the following error: x-values and y-values need to have the same length in order to create ordered pairs of points. x has 11 elements and y1 has 4 elements.

I’m assuming the exercise is using the x list as the x coordinates and y list as the y coordinates. If that’s the case, then the reason the lists must be the same size is because each x coordinate needs a matching y coordinate. And if x has 11 elements and y has four elements, this would not be met

Thank you for the reply. I was attempting to use the data from one of the use cases linked in the lesson. If I were to create this outside of script.py would this work?