I am extending from an example provided here. Heatmap with circles indicating size of population
However, I am lost on how to use a NumPy array with PathCollector to create a heatmap that produces a single columns of 20 variables(Term) with circles that indicated size (Number_Protein) and Colour (P_value_abs).
This is where I have gotten thus far, any help would be appreciated.
ylabels = Shared["Term"]
xlabels = ["Overlap"]
x, y = np.meshgrid(1, 20)
s = Shared["Number_Protein"]
c = Shared["P_value_abs"]
fig, ax = plt.subplots()
R = s/s.max()/2
circles = [plt.Circle((j,i), radius=r) for r, j, i in zip(R, x, y)]
col = PatchCollection(circles, array=c, cmap="coolwarm")
ax.add_collection(col)
ax.set(xticklabels=xlabels, yticklabels=ylabels)
fig.colorbar(col)
plt.show()
This question was answered, but I just wanted to show the final product incase someone was curious.