help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Print Problem: Figure Background won't get printed


From: aikon96
Subject: Re: Print Problem: Figure Background won't get printed
Date: Sun, 21 Feb 2016 13:13:55 -0800 (PST)

Ok, just tested this code also in MATLAB and the problem is the same.

For MATLAB I found a workaround to get the black background:

clear all
close all
clc

% graphics_toolkit ('qt')

x = linspace(0,2*pi,100);


figure(1)
set(gcf,'Color',[0,0,0])
hold on
rectangle('Position',[0 -1 100 2],'FaceColor','Black')
plot(sin(x))
grid on
set(gca, 'YColor', [1 1 1])
set(gca, 'XColor', [1 1 1])
hold off
% print('test.png','-dpng')


fig = gcf;
fig.Color = 'black';
fig.InvertHardcodpy = 'off';
saveas(gcf,'test.png')


So with this lines, MATLAB's image is like that:
<http://octave.1599824.n4.nabble.com/file/n4674950/test.png> 


So am I right that octave cannot handle the fig as an object like this:

fig = gcf;
fig.Color = 'black';
fig.InvertHardcodpy = 'off';
saveas(gcf,'test.png')






--
View this message in context: 
http://octave.1599824.n4.nabble.com/Print-Problem-Figure-Background-won-t-get-printed-tp4674940p4674950.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]