how to flip mirror contour plot horizontally (to flip about 180 degrees)
16 views (last 30 days)
Show older comments
Abba Alhaji Bala
on 2 Dec 2020
Commented: Muhammad Adil Rehman
on 13 Feb 2022
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
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)
2 Comments
More Answers (0)
See Also
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!