[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45631] Line dissapear from plot when modifyin
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #45631] Line dissapear from plot when modifying "plotboxaspectratio" |
Date: |
Sun, 26 Jul 2015 12:14:01 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0 |
URL:
<http://savannah.gnu.org/bugs/?45631>
Summary: Line dissapear from plot when modifying
"plotboxaspectratio"
Project: GNU Octave
Submitted by: None
Submitted on: sön 26 jul 2015 12.14.00
Category: Plotting
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 3.8.1
Operating System: GNU/Linux
_______________________________________________________
Details:
This bug is present in booth 3.8.1 and 4.0.0. It also affect both FLTK and
Qt.
When modifying "plotboxaspectratio", it becomes impossible to draw a line.
Only dots works. It only appears for certain input data, suggesting some bad
rounding.
The script:
load mod34_beta2.mat;
tab1=tab;
load mod34_beta.mat;
corrplot(tab(:,4),tab1(:,4),'X','X',1,1);
corrplot(tab(:,7),tab1(:,7),'X','X',1,1);
The helper function exploiting the bug
function corrplot(X,Y,x_label,y_label,X_scale,Y_scale)
P=polyfit(X,Y,1);
x=linspace(min(X),max(X),64);
plot(X/X_scale,Y/Y_scale,'.','markersize',4);
hold on
if(strcmp(x_label,y_label))
set(gca(),'dataaspectratio', [1, 1, 1]);
set(gca(),'plotboxaspectratio', [1,1,1]); %(1) Works without
this line
end
plot(x/X_scale,polyval(P,x)/Y_scale,'--'); % With (1), this command has
no
effect, changing '--' to '.', or removing (1) and it works
drawnow
xlabel(x_label);
ylabel(y_label);
hold off
end
The bug affects `axis equal` since it sets the affected property.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: sön 26 jul 2015 12.14.00 Name: mod34_beta.mat Size: 4 kB By: None
Files with data
<http://savannah.gnu.org/bugs/download.php?file_id=34529>
-------------------------------------------------------
Date: sön 26 jul 2015 12.14.00 Name: mod34_beta2.mat Size: 4 kB By: None
Files with data
<http://savannah.gnu.org/bugs/download.php?file_id=34530>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45631>
_______________________________________________
Meddelandet skickades via/av Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #45631] Line dissapear from plot when modifying "plotboxaspectratio",
anonymous <=