I am using heatmap and want to display x-axis in expressions of pi instead of numbers. Is there a way to do this. I tried xticklabels but it does not work with heatmap.
h = heatmap(phipt,ept,e1);
My x-axis
h.XVariable = {'0','\pi/4','\pi/2','3\pi/4','\pi'}

 채택된 답변

Walter Roberson
Walter Roberson 2019년 4월 30일

0 개 추천

h.XDisplayLabels = {'0', '\pi/4', '\pi/2', '3\pi/4', '\pi'};

댓글 수: 2

Before R2019a, you would also do
h.NodeChildren(3).XAxis.TickLabelInterpreter = 'tex';
Muhammad Hamza Khalid
Muhammad Hamza Khalid 2019년 5월 1일
Thank You!
This worked.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Data Distribution Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by