I'm trying to make my tick marks on the x-axis longer so that they're easier to see. Here is my script for creating the figure and what it looks like currently:
figure;
% grey for the day, but you can change :)
semilogx(freq_axis, spectrum_day,'LineWidth', 1.5, 'Color', [0.5 0.5 0.5]);
hold on;
% black for the night
semilogx(freq_axis, spectrum_night,'LineWidth', 1.5, 'Color', [0 0 0]);
set(gca, 'fontsize', 12)
xlim([10 40000])
ylim([50 85])
xlabel('Frequency (Hz)')
ylabel('PSD (dB re 1 µPa^2/Hz)')
% inserts a legend on the plot
legend({'Daytime (06:00-19:00)', 'Nighttime (19:00-06:00)'});
legend ('Location', 'southeast', 'FontSize', 12);
legend boxoff;
hold off;

 採用された回答

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2022 年 2 月 21 日

0 投票

Use these, e.g.:
plot(x, y);
ax=gca;
ax.TickLength = [0.05 0.05]; shg

1 件のコメント

Kirby Parnell
Kirby Parnell 2022 年 2 月 21 日
Thank you! This worked for me.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by