How can I get rid of Title and x-label parts by default?

조회 수: 53 (최근 30일)
Moein
Moein 2017년 4월 10일
댓글: rezheen 2025년 5월 29일
Hi friends
I generate plots using ezplot. I changed some Default properties like Linewidth, Linecolor, Fontsize, .... using some codes as follows:
set(0, 'DefaultAxesFontSize', 20); set(0, 'DefaultAxesFontName', 'Cambria'); set(0, 'DefaultAxesFontWeight', 'Bold'); set(0, 'DefaultAxesLineWidth', 2);
But, I can not get rid of "Title" and "x-label" that appear by default. Please help me to get rid of them.
please see attached picture. (I don't know why there is no attach button!!!).
  댓글 수: 2
Aishwarya Rao
Aishwarya Rao 2021년 11월 29일
You can simply try
title('')
to override the existing.

댓글을 달려면 로그인하십시오.

답변 (1개)

Adam
Adam 2017년 4월 10일
Use
doc fplot
instead. It has neither of these by default and is recommended by the help to use instead of ezplot (at least in my R2017a version anyway and fplot has been in Matlab since before R2006a)
  댓글 수: 3
Adam
Adam 2017년 4월 10일
fplot(V2, [0 3.5 -0.05 1.05], 'LineWidth', 2);
will deal with the line width.
For the range I don't know what V2 is, but if I do:
figure; fplot( @(x) sin(x), [-0.05 1.05] )
I get the range [-0.05 1.05] as expected.
Moein
Moein 2017년 4월 10일
thank you dear Adam
about linewidth, I said I wanna generate figures with appropriate linewidth by default, not by adding code after fplot.
about the range, the appropriate range is [0 3.5 -0.05 1.05] that includes [0 3.5] as x-range (horizontal axis) and [-0.05 1.05] as V2-range (vertical axis) but in your case [-0.05 1.05] is x-range. For more details, when I use [0 3.5 -0.05 1.05] the range [0 3.5] applies for x-range correctly but the range [-0.05 1.05] does not appear while it works correctly for ezplot.
Is there any way to hide these properties for the same ezplot? any way similar to: set(0, 'Default.............', ------------);

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by