How do you make a COMPASS plot completely transparent?

J
johncrazliva032 · Aug 31, 2020 · 2K views
Question
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 PhD Expert
Answered Aug 25, 2026

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

 

ph = allchild(gca);
set(ph(end),'FaceColor','none')
100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!