[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #65051] [Octave] print command does not render
From: |
Thomas |
Subject: |
[Octave-bug-tracker] [bug #65051] [Octave] print command does not render plot correctly in pdf |
Date: |
Tue, 19 Dec 2023 10:14:39 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?65051>
Summary: [Octave] print command does not render plot
correctly in pdf
Group: GNU Octave
Submitter: betdiscart
Submitted: Tue 19 Dec 2023 03:14:37 PM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name: BETDiscart
Originator Email:
Open/Closed: Open
Release: 8.4.0
Discussion Lock: Any
Operating System: Microsoft Windows
Fixed Release: None
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Tue 19 Dec 2023 03:14:37 PM UTC By: Thomas <betdiscart>
Hello
I'm trying to print a pdf plot in GNU Octave. I use Octave on a windows
machine. The graph is shown on the plot screen when executing the code.
Unfortunately the plot does not show the full graph when opening the plot in
the PDF document (see attachment).
Strangely enough the issue does not occur when I print the plot in png.
print(h,'Test.png',"-dpng")
Below i have made an example code to illustrate the problem. Does anyone know
how to resolve this issue?
close all
clear all
clc
x = [0:0.001:1]';
y = zeros(size(x,1),10);
y(:,1) = arrayfun(@(x) x^(1/5),x);
y(:,2) = arrayfun(@(x) x^(1/4),x);
y(:,3) = arrayfun(@(x) x^(1/3),x);
y(:,4) = arrayfun(@(x) x^(1/2),x);
y(:,5) = arrayfun(@(x) x,x);
y(:,6) = arrayfun(@(x) x^2,x);
y(:,7) = arrayfun(@(x) x^3,x);
y(:,8) = arrayfun(@(x) x^4,x);
y(:,9) = arrayfun(@(x) x^5,x);
y(:,10) = arrayfun(@(x) x^6,x);
h = figure
hold on
for i = 1:10
plot(x,y(:,i))
end
grid
set(gcf,'papert', '<custom>')
set(gcf,'paperunits','centimeters');
set(gcf,'papersize',[29.7 21])
set(gcf,'paperposition', [1 1 27.7 19])
set(gcf,'defaultaxesposition', [0.15, 0.15, 0.75, 0.75])
set (0,'defaultaxesfontsize', 11)
print(h,'Test.pdf',"-dpdf")
The same issue occurs when the command "saveas" is used.
Thanks in advance
Thomas
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65051>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #65051] [Octave] print command does not render plot correctly in pdf,
Thomas <=
- Message not available
- [Octave-bug-tracker] [bug #65051] [Octave] print command does not render plot correctly in pdf, Rik, 2023/12/19
- [Octave-bug-tracker] [bug #65051] [Windows] print command does not render plot correctly in pdf, Rik, 2023/12/19
- [Octave-bug-tracker] [bug #65051] [Windows] print command does not render plot correctly in pdf, Thomas, 2023/12/19
- Message not available
- [Octave-bug-tracker] [bug #65051] [Windows] print command does not render plot correctly in pdf, Thomas, 2023/12/19
- Message not available
- [Octave-bug-tracker] [bug #65051] [Windows] print command does not render plot correctly in pdf, Dmitri A. Sergatskov, 2023/12/19
- [Octave-bug-tracker] [bug #65051] [Windows] print command does not render plot correctly in pdf, Thomas, 2023/12/20
- Message not available
- [Octave-bug-tracker] [bug #65051] print command does not render plot correctly in pdf, Nicholas Jankowski, 2023/12/20