viscircles - How to flip dashed line?

Y
yonatan s · Feb 11, 2023 · 2.1K views
Question
Hi, I'm using viscircles to draw a circle with the dashed line property. The problem is one specific dash line interefers with a data point (the circle is stack backwards, but its color and the data color both have red hue).   Is there a way to flip the dashed line, so where it is blank it would be red and viceversa?  
Expert Answer
Profile picture of Kshitij Singh
Kshitij Singh PhD Expert
Answered Aug 24, 2026
h = viscircles([.5,.5], 1, 'LineStyle', '--', 'color', 'r');
nc1 = h.NodeChildren(1);

set(nc1, 'XData', fliplr(nc1.XData), 'YData', fliplr(nc1.YData))

 

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!