why does set(gca) not working
I am trying to set the axis label’s font size. Here is my code
%% This section of code plots the k-means cost as a function of the number
% of iterations
% Count the number of iterations.
figure;
x = 1:max_iter; % this is the x axis
grid on;
set(gca,’fontsize’,FONT_SIZE) % THIS IS WHEN I TRIED TO USE GCA BUT IT DOES NOT WORK
plot(x,cost_iteration,’bo-‘); % plot the cost per iteration
title("Graph of K-means Cost Per Iteration", ‘Fontsize’,FONT_SIZE);
xlabel("iteration", ‘Fontsize’,FONT_SIZE);
ylabel("cost", ‘Fontsize’,FONT_SIZE);
axis normal;
I tried to use set to make the font size of gca work, but it does not work. and here is what I print out.
please helpI am trying to set the axis label’s font size. Here is my code
%% This section of code plots the k-means cost as a function of the number
% of iterations
% Count the number of iterations.
figure;
x = 1:max_iter; % this is the x axis
grid on;
set(gca,’fontsize’,FONT_SIZE) % THIS IS WHEN I TRIED TO USE GCA BUT IT DOES NOT WORK
plot(x,cost_iteration,’bo-‘); % plot the cost per iteration
title("Graph of K-means Cost Per Iteration", ‘Fontsize’,FONT_SIZE);
xlabel("iteration", ‘Fontsize’,FONT_SIZE);
ylabel("cost", ‘Fontsize’,FONT_SIZE);
axis normal;
I tried to use set to make the font size of gca work, but it does not work. and here is what I print out.
please help I am trying to set the axis label’s font size. Here is my code
%% This section of code plots the k-means cost as a function of the number
% of iterations
% Count the number of iterations.
figure;
x = 1:max_iter; % this is the x axis
grid on;
set(gca,’fontsize’,FONT_SIZE) % THIS IS WHEN I TRIED TO USE GCA BUT IT DOES NOT WORK
plot(x,cost_iteration,’bo-‘); % plot the cost per iteration
title("Graph of K-means Cost Per Iteration", ‘Fontsize’,FONT_SIZE);
xlabel("iteration", ‘Fontsize’,FONT_SIZE);
ylabel("cost", ‘Fontsize’,FONT_SIZE);
axis normal;
I tried to use set to make the font size of gca work, but it does not work. and here is what I print out.
please help set, plot MATLAB Answers — New Questions