I have a series of subplots with red and blue markers, I am most interested in the red markers so want to bring them to the front of the plot:
The data structure is like this:
SzT Pcp Pcp_3day Pcp_7day Pcp_10day Pcp_14day Pcp_21day Pcp_28day
date
2017-12-04 0.0 8.382 19.304 21.082 40.132 40.132 42.418 71.374
2017-12-05 0.0 12.192 20.574 33.020 42.164 52.324 52.578 81.534
2017-12-06 0.0 1.016 21.590 33.020 34.290 53.340 53.594 82.550
2017-12-07 0.0 12.700 25.908 45.466 46.990 66.040 66.040 95.250
2017-12-08 0.0 5.080 18.796 50.292 51.816 71.120 71.120 88.900
The colours are determined by the value of 'SzT' that each data point belongs to, which is either 1 or 0 (though in the above only '0' is shown). I constructed this with the code below:
colors = {0 : 'b',
1 : 'r'}
fig = plt.figure(figsize=(20,10))
ax = fig.add_subplot(111)
ax1 = fig.add_subplot(221)
ax2 = fig.add_subplot(222)
ax3 = fig.add_subplot(223)
ax4 = fig.add_subplot(224)
c = [colors[i] for i in RGDFT8mm['SzT']]
m = [marker[i] for i in RGDFT8mm['SzT']]
ax1.scatter(RGDFT8mm['Pcp'], RGDFT8mm['Pcp_3day'], c=c)
ax2.scatter(RGDFT8mm['Pcp'], RGDFT8mm['Pcp_7day'], c=c)
ax3.scatter(RGDFT8mm['Pcp'], RGDFT8mm['Pcp_14day'], c=c)
ax4.scatter(RGDFT8mm['Pcp'], RGDFT8mm['Pcp_28day'], c=c)
ax.set_title('Daily Rainfall vs antecedent rainfall from Rain Gauges 2001-2017')
ax.set_xlabel('Daily Rainfall (mm)')
ax.set_ylabel('Antecedent rainfall (mm)')
ax.set_yticklabels([])
ax.set_xticklabels([])
ax1.set_title('3 Day')
ax2.set_title('7 Day')
ax3.set_title('14 Day')
ax4.set_title('28 Day')
I can't find any information that is helpful elsewhere. Any ideas out there?
Thanks!
UPDATE: Apologies for the poor original structure, I have added the structure of the data above FYI.