[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Print Problem: Figure Background won't get printed
From: |
aikon96 |
Subject: |
Print Problem: Figure Background won't get printed |
Date: |
Sun, 21 Feb 2016 06:59:16 -0800 (PST) |
Hey there,
I'm just trying to get a plotted Octave figure to file.
So I plotted everything -> OK, set the background of the figure to black and
wanted to print it to file.
My Octave plot looks like this:
<http://octave.1599824.n4.nabble.com/file/n4674940/pic.png>
So by using the print command, I always get a white background of the
figure:
<http://octave.1599824.n4.nabble.com/file/n4674940/test.jpg>
Can someone help me to get the black background at saved file?
Using ubuntu 15.10, Octave v.4.0.0
My code:
clear all
close all
clc
graphics_toolkit ('qt')
x = linspace(0,2*pi,100);
figure(1)
set(gcf,'Color',[0,0,0])
plot(sin(x))
hold on
rectangle('Position',[0 -1 100 2],'FaceColor','Black')
grid on
set(gca, 'YColor', [1 1 1])
set(gca, 'XColor', [1 1 1])
hold off
print('test.png')
So by using this print command I get transparent background, but how to get
a black background?
print(gcf, '-dpngalpha',test.png);
--
View this message in context:
http://octave.1599824.n4.nabble.com/Print-Problem-Figure-Background-won-t-get-printed-tp4674940.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Print Problem: Figure Background won't get printed,
aikon96 <=