python - Plot over subplot -


I have a subplot inside an existing ax frame, and there are some lines in the subplot or a full contour plot. What I want to do is plot some rows in the current large frame, and this line should be above rows / contour in the subfigure. The following is a small example: Actually I want blue and / or green lines above the red line, it seems that Zedar has no effect for lines related to different sub-axes.

  import matplotlib.pyplot as plt fig = plt.figure () plt.plot ([0,2], color = 'blue', zorder = 300) ax0 = gca ( ) Ax = fig.add_axes ([0.3,0.3,0.3,0.3], zorder = 0, axisbg = 'none') ax.plot ([0,1], [0, 0], linewidth = 40, color = ' Red ', zorder = -100) ax0.plot ([0.55,0.55], [0,2], linewidth = 20, color =' green ', zorder = 200)    

I am getting a solution which can not be right but works for it. This trick is to set a large horoscope frame on a high grader, and to make the background color transparent, so that the small axis can be seen in the background, and thus the lines of the main frame will naturally be on the top smaller frames. Of rows in

  import matplotlib.pyplot as plt fig = plt.figure () plt.plot ([0,2], color = 'blue') ax0 = gca () Ax0.set_zorder (100) ax0.set_axis_bgcolor ('none') ax = fig.add_axes ([0.3,0.3,0.3,0.3], zorder = 0, axisbg = 'none') ax.plot ([0,1], [1, 0], linewidth = 40, color = 'red') ax0.plot ([0.55,0.55], [0,2], linewidth = 20, color = 'green')    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -