matplotlib not working | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

matplotlib not working

My matplotlib cartesian-axis display is not working. Can someone help me? ax = plt.gca() ax.spines['top'].set_color('none') ax.spines['bottom'].set_position('zero') ax.spines['left'].set_position('zero') ax.spines['right'].set_color('none') The bottom axis is sent to 0 but the left doesn’t. Example in the code. Can you help me? INPUT: y = 3x - 3 https://code.sololearn.com/cM80c3OE0VVn/?ref=app

30th Jan 2023, 5:15 PM
Ugulberto Sánchez
Ugulberto Sánchez - avatar
2 Answers
+ 6
Ugulberto Sánchez , i did a try with your code in playground and it is showing a diagram. what is your output showing?
30th Jan 2023, 6:38 PM
Lothar
Lothar - avatar
+ 1
Lothar I mean, the y axis isn’t placed to 0, and i don’t know how to change that
30th Jan 2023, 6:39 PM
Ugulberto Sánchez
Ugulberto Sánchez - avatar