Avoid scientific notation in graphs
조회 수: 20 (최근 30일)
이전 댓글 표시
Willian Alexander Correa Reyes
2021년 7월 8일
댓글: Willian Alexander Correa Reyes
2021년 7월 8일
how to avoid scientific notation
My codes is:
tmp = readtable('re.csv');
y_line_1= table2array(tmp(:,7));
x_line_1= table2array(tmp(:,3));
plot(x_line_1,y_line_1,'b-')
grid on
xlabel('número de nodos')
ylabel('Velocidad')
ylim([4.0897014 4.0897016])
title('Independencia de malla')
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/678318/image.jpeg)
댓글 수: 0
채택된 답변
Bhavya Chopra
2021년 7월 8일
Setting the ‘Exponent’ property for the axis to zero will remove the scientific notation for the axis. This can be achieved in your program as follows:
h = plot(x_line_1,y_line_1,'b-')
ax = ancestor(h, 'axes')
ax.XAxis.Exponent = 0;
Please refer to the documentation for the ancestor function and the NumericRuler Properties page for more information.
Further, please find attached a related MATLAB Answer: How can I prevent scientific notation on my axes in MATLAB R2015b and later?
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!