How to change the size ofaAxes of a Signal Analyzer App Plot

조회 수: 8 (최근 30일)
Björn Bents
Björn Bents 2021년 9월 13일
답변: Saurav 2024년 2월 21일
Hey Guys,
for a scientific paper, I need to analize some data. For this I used the Signal Analyzer App. With this App the task is much easier. By copy the plot to my paper, i saw that the axes title and the axes numbers are really small. Now the question: Is the a possibility to change the Size of the axes of this plot from the Signal Analyzer App or do i have to plot it by an own code?
You can see an example in the attachments:)
Kind regards
Björn

답변 (1개)

Saurav
Saurav 2024년 2월 21일
Hello,
It is my understanding that you want to modify the font size of the axes labels, titles, and other text elements directly from the Signal Analyzer App.
Unfortunately, there is no method to directly change the font size of the axes using the Signal Analyzer App; you will have to use a different approach.
Here is a workaround that you can follow:
  1. In the Signal Analyzer App, select the signal you want to export.
  2. In the app’s toolstrip, click on the “Export” button.
  3. Choose to export the selected signal to the MATLAB workspace.
  4. Once the signal is in the workspace, use MATLAB’s plotting functions to manipulate the font size of the axes.
You can follow the below workaround to customize the font sizes:
% Example variables
t = yourExportedTimeVector; % Replace with your actual time vector
s = yourExportedSignal; % Replace with your actual signal data
% Create a plot
figure;
plot(t, s);
xlabel('Time (s)', 'FontSize', 14); % Set x-axis label with larger font size
ylabel('Amplitude', 'FontSize', 14); % Set y-axis label with larger font size
title('Signal Plot', 'FontSize', 16); % Set title with larger font size
Additionally, you can modify the axes font size directly with the following MATLAB commands:
% Adjust axes font size
ax = gca; % Get current axes
ax.FontSize = 12; % Set axes ticks font size
Ensure that you replace the variables “yourExportedTimeVector” and “yourExportedSignal” with the actual variable names of the exported time vector and the signal data from the Signal Analyzer App.
You can refer to the following documentations to learn more about “xlabel”, “ylabel”, “title” and “gca”:
  1. https://www.mathworks.com/help/releases/R2023b/matlab/ref/xlabel.html
  2. https://www.mathworks.com/help/releases/R2023b/matlab/ref/ylabel.html
  3. https://www.mathworks.com/help/releases/R2023b/matlab/ref/title.html
  4. https://www.mathworks.com/help/releases/R2023b/matlab/ref/gca.html
I hope you find this helpful!

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by