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
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
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
xt = 1×7
-3 -2 -1 0 1 2 3
Ax.YTickLabel = xt*pi; % New Tick Labels
yt = Ax.YTick % Tick Values
yt = 1×7
-3 -2 -1 0 1 2 3
Ax.XTickLabel = yt-min(yt); % New Tick Labels
xlabel('Time (units)')
ylabel('Frequency (units)')
.
  3 个评论
Alex Pettit
Alex Pettit 2022-5-25
GOT IT Nice : Thanks Everyone.
The data is in two column Freq / Ampl pairs from the SDR ( software defined radio ) at a data rate of
3000 FFT blocks per second. I am acquiring 5 minutes of data into one saved set .. consisting of 900,000 averages. Thankfully, I do not need to save the Time data !
FYI
Here is a surface plot of 100 data sets ( FFT 512 elements ) over ~ 8 hour period .
Freq range in the 1.42 GHz Hydrogen RF range .. Doppler shifted due th the relative motion of the Hydrogen clouds & Earth.
It represents a 10 degree wide, 8 hour long slice through the Milky Way and surrounding area
( A new hobby )
Regards,
Alex P
Star Strider
Star Strider 2022-5-25
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 AI for Signals 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by