Danushka herath
Danushka herath

Reputation: 986

octave graph background color changing

I need to change the figure background color in Octave. No idea how to do that.

From this:

To this:

Upvotes: 0

Views: 2381

Answers (1)

Tasos Papastylianou
Tasos Papastylianou

Reputation: 22215

X = 0:0.01:2*pi;
Y = sin(X);
f = figure('color', [0.2, 0.2, 0.2]);
ax = axes();
p = plot(X, Y, 'r')
xlabel('time or sth', 'color', 'g')
ylabel('value', 'color', 'b')
grid on
set(ax, 'color', 'k', 'ycolor', 'c', 'xcolor', 'g', 'gridlinestyle', '--', 'linewidth', 2, 'gridalpha', 0.5);

Upvotes: 4

Related Questions