-
Notifications
You must be signed in to change notification settings - Fork 981
Description
Discussed in #2538
Originally posted by cxjcqu April 1, 2023
If AxisIndex of XAxis and XAxis2 are both equal to 0, the graph can only be moved up and down, not left and right. If AxisIndex of XAxis and XAxis2 are both equal to 1, an error will occur. YAxis and YAxis2 have similar problems.
Situation 1
plt.XAxis.AxisIndex = 0;
plt.YAxis.AxisIndex = 0;
plt.XAxis2.AxisIndex = 0;
plt.YAxis2.AxisIndex = 0;In this case, the graph cannot be scaled or moved. It may be because Axis and Axis2 are independent of each other and cannot be assigned the same index. Programs can be optimized and improved to allow graphics to zoom and move, because many charts require ticks on both the top and bottom as well as the left and right sides, and the tick labels should be the same, like the curve below.
Situation 2
plt.XAxis.AxisIndex = 1;
plt.YAxis.AxisIndex = 1;
plt.XAxis2.AxisIndex = 1;
plt.YAxis2.AxisIndex = 1;In this case, the program can cause errors. It is necessary to carry out fault tolerant processing on the program.
