You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Over time we have added input options to the pcv.visualize.pseudocolor function and there's a potential for it to get unwieldy. I'm not sure if folks would see this as more user-friendly or not, but what if we created a (ideally) flexible layered plotting scheme?
This class doesn't implement everything included in pseudocolor currently but it works for a demo. Each class method returns the instance of the class allowing you to chain methods together.
# Create a new instanceps=Pseudocolor()
# Create an empty figure (not very interesting)fig=ps.figure()
# Add a plotting layerfig=fig.plot_layer(img=gray_img, cmap="gray")
Remove the background layer and add a title and colorbar:
fig=lp.figure().plot_layer(img=np.ma.array(gray_img2, mask=~bin_clean.astype(bool)), cmap="viridis").add_title("Pseudocolor image on white background").add_colorbar()
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Over time we have added input options to the
pcv.visualize.pseudocolor
function and there's a potential for it to get unwieldy. I'm not sure if folks would see this as more user-friendly or not, but what if we created a (ideally) flexible layered plotting scheme?This class doesn't implement everything included in
pseudocolor
currently but it works for a demo. Each class method returns the instance of the class allowing you to chain methods together.Or chain methods together instead:
Remove the background layer and add a title and colorbar:
Beta Was this translation helpful? Give feedback.
All reactions