Proper Labeling of X & Y values Contour Plot
21 次查看(过去 30 天)
显示 更早的评论
Is there a way to use arrays for labeling the X&Y values of a Contour Plot ..
In this case, Y would be Frequency and X Time ( radio telescope data acq sequence )
1 个评论
DGM
2022-5-25
How are you using contour? If you're calling contour() with three arguments, it should have ticks and tick labels on both axes already.
采纳的回答
Star Strider
2022-5-25
Use the tick label properties to change the tick labels. Any new tick values have to be in the ranges of the current tick values, so changing them is not likely to produce the desired results.
[X,Y,Z] = peaks(50);
figure
[c,h] = contourf(X, Y, Z);
Ax = gca; % Axes Handle
xt = Ax.XTick % Tick Values
Ax.YTickLabel = xt*pi; % New Tick Labels
yt = Ax.YTick % Tick Values
Ax.XTickLabel = yt-min(yt); % New Tick Labels
xlabel('Time (units)')
ylabel('Frequency (units)')
.
3 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 AI for Signals 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!