How do you make a COMPASS plot completely transparent?

Illustration
johncrazliva032 - 2020-08-31T10:53:02+00:00
Question: How do you make a COMPASS plot completely transparent?

Some background info: I've been using the following two commands to make plots transparent:   set(gcf,'color','none'); set(gca,'color','none'); and then using export_fig to export them into transparent PNG files, which can be overlayed onto Google Earth. This has been working for all plots (plot, quiver, surf, pcolor, etc.) For some reason when I use the two commands mentioned earlier with COMPASS, the entire figure window becomes transparent but not the circular plot itself. ie, the square window is transparent but the circular plot itself still has a solid white background.

Expert Answer

Profile picture of Neeta Dsouza Neeta Dsouza answered . 2025-11-20

compass() creates a hidden child of the axis, of type patch.

 

ph = allchild(gca);
set(ph(end),'FaceColor','none')


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!