How do I make tick marks longer?
Show older comments
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;

Accepted Answer
More Answers (0)
Categories
Find more on Legend 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!