bug #62081: quiver: arrowheads damage plot (to large)

 Submitter: None Submitted: Fri 18 Feb 2022 06:51:01 PM UTC Category: Plotting Severity: 3 - Normal Priority: 5 - Normal Item Group: Feature Request Status: Works For Me Assigned to: None Originator Name: Manfred Quasten Originator Email: -email is unavailable- Open/Closed:  * Closed Release:  * 5.2.0 Operating System:  * Microsoft Windows
* Mandatory Fields

Comment Type & Canned Response:

Discussion

Wed 01 Jun 2022 06:31:26 PM UTC, comment #2:

also comparing in Octave 6.4.0 and Matlab 2022a, I get the same plots from your richtungsfeld function, imaged attached.

Noticing the report release tag, maybe this issue was unique to v 5.2.0? absent any other followup since Feb, closing report. can reopen if new information arises.

Nicholas Jankowski <nrjank>
Fri 18 Feb 2022 10:58:03 PM UTC, comment #1:

Have you tried this in Matlab?

I tried the code in richtungsfeld.m in both Octave and Matlab and they produce the same plots.  It appears that this is what is supposed to happen.

If I go to review the source code at https://de.wikipedia.org/wiki/Richtungsfeld

it is not the same as the attached m-file.

I copied the code that is on de.wikipedia.org and organized it into one file which is attached and shown below

1;

function richtungsfeld(dgl)
% dgl ist die erste Ableitung von y nach x und ist i.A. eine Funktion von x und y
% Ausschnitt und Abstand zwischen den Vektoren
y = -5:.5:5; x = -5:.5:5;
for y_n = 1:length(y)
for x_n = 1:length(x)
len = sqrt( dgl(y(y_n), x(x_n))^2 + 1 ); % Länge des Vektors für Normierung
dx(y_n,x_n) = 1 / len;                   % Länge des Vektors entlang der Abszisse
dy(y_n,x_n) = dgl(y(y_n), x(x_n)) / len; % Länge des Vektors entlang der Ordinate
end
end
h=quiver(x, y, dx, dy,0.5,"r","linewidth",1); % Vektoren zeichnen
xlabel ("x");
ylabel("y");
print('field.svg', '-dsvg')  % Plot als svg-Datei exportieren
% Ende des Files
endfunction

%source("richtungsfeld.m")
dgl = @(y, x) y-x   % Funktionsdefinition
richtungsfeld(dgl)

Rik <rik5>
Fri 18 Feb 2022 06:51:01 PM UTC, original submission:

plotting  a direction field of an ode the plot is damaged by the arrow head when ordinate scale is smal.

without line 14 (richtungsfeld.m)  the direction field from

z' = 1/0.00159979*sqrt(1+z^2)

is not useable. Switching the arrowheads off, it looks good.  The arrow heads will damage it.  In this case it make no difference to skip it because z' is monotonous increasing on R, and no information will be lost.  It have taken some time to  found that the script works and that the size of the arrow heads will be the problem. The size of the arrowheads should scale automaticly, the default is too large and I was not able to resize it (MaxHeadSize property).

Anonymous

Attached Files

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Comment:

Attached Files
file #53265:  Picture1.png added by nrjank (80KiB - image/png - matlab/octave plot comparison - no noticeable difference)
file #52890:  tst_arrow_sz.m added by rik5 (800B - text/x-matlab)
file #52883:  richtungsfeld.m added by None (618B - application/octet-stream)
file #52884:  direction-field-modern-art.png added by None (75KiB - image/png)
file #52886:  math.txt added by None (560B - text/plain)

Dependencies

Depends on the following items: None found

Items that depend on this one: None found

Carbon-Copy List
• -email is unavailable- added by nrjank (Updated the item)
• -email is unavailable- added by rik5 (Updated the item)
• -email is unavailable- added by None (Submitted the item)
•

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only project members can vote.

History

Date Changed by Updated Field Previous Value => Replaced by
2022-06-01 nrjank Attached File- Added Picture1.png, #53265
StatusNeed Info Works For Me
Open/ClosedOpen Closed
2022-02-18 rik5 StatusNone Need Info
2022-02-18 rik5 Attached File- Added tst_arrow_sz.m, #52890
2022-02-18 None Attached File- Added richtungsfeld.m, #52883