how to flip mirror contour plot horizontally (to flip about 180 degrees)

16 views (last 30 days)
Hello everyone, please i have this code which i used the attached files to generated the mirror contour plot as in the figure. Please how can i flip the two contours horizontally? in other words both contours to flip to 180 degrees horizontal.
figure
[C,h] = contour(R,Z,psi,9,'linewidth',1.9)
hold on
[C,h] = contour(-R,Z,psi,9,'linewidth',1.9)

Accepted Answer

Ameer Hamza
Ameer Hamza on 2 Dec 2020
Are you looking for something like this
psi = readmatrix('psi_all.txt');
Z = readmatrix('Z_all.txt');
R = readmatrix('R_all.txt');
figure
[C,h] = contour(R,Z,flipud(psi),9,'linewidth',1.9)
hold on
[C,h] = contour(-R,Z,flipud(psi),9,'linewidth',1.9)

More Answers (0)

Categories

Find more on Contour Plots in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!