How to use Python to draw layer priority with matplotlib.pyplot as plt
This article mainly introduces the relevant knowledge of "Python how to use matplotlib.pyplot as plt drawing layer priority". Xiaobian shows you the operation process through actual cases. The operation method is simple and fast, and practical. I hope this article "Python how to use matplotlib.pyplot as plt drawing layer priority" can help you solve the problem.
Before adjustment:
ax.hlines(y=30, xmin=-50, xmax=200, color='gray', linewidth=50)ax.hlines(y=0, xmin=-50, xmax=200, color='gray', linewidth=50)ax.hlines(y=-30, xmin=-50, xmax=200, color='gray', linewidth=50)obstacle = plt.Circle((120.0, -5.0), 5.0, color='red', fill=True, linewidth=1)obstacle1 = plt.Circle((60.0, 27.0), 5.0, color='red', fill=True, linewidth=1)obstacle2 = plt.Circle((60.0, -29.0), 5.0, color='red', fill=True, linewidth=1)
Adjusted:
ax.hlines(y=30, xmin=-50, xmax=200, color='gray', linewidth=50, zorder=1)ax.hlines(y=0, xmin=-50, xmax=200, color='gray', linewidth=50, zorder=1)ax.hlines(y=-30, xmin=-50, xmax=200, color='gray', linewidth=50, zorder=1)obstacle = plt.Circle((120.0, -5.0), 5.0, color='red', fill=True, linewidth=1, zorder=2)obstacle1 = plt.Circle((60.0, 27.0), 5.0, color='red', fill=True, linewidth=1, zorder=2)obstacle2 = plt.Circle((60.0, -29.0), 5.0, color='red', fill=True, linewidth=1, zorder=2)
The content of "Python how to use matplotlib.pyplot as plt drawing layer priority" is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the industry information channel. Xiaobian will update different knowledge points for you every day.