bugGNU Octave - Bugs: bug #42836, Compass plot does not show angles...

 
 

bug #42836: Compass plot does not show angles on axis

Submitter:  Rick T <ratulloch>
Submitted:  Thu 24 Jul 2014 03:45:47 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  Rick T Open/Closed:  * Closed
Release:  * 3.8.1 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 24 Jul 2014 07:25:06 PM UTC, comment #4: 
Anonymous
Thu 24 Jul 2014 07:11:32 PM UTC, comment #3: 

It would be great it it's just a m-file replacement but where is the new m-file?

Rick T <ratulloch>
Thu 24 Jul 2014 06:19:19 PM UTC, comment #2: 

This has been fixed in the development sources.  You can build a copy of Octave from Mercurial sources to see the change, or wait until the 4.2 release (alas, this is going to be a while).  Because this is just an m-file you might be able to simply replace the local copies of m-files that deal with plotting with the versions from Mercurial.

Rik <rik5>
Group administrator
Thu 24 Jul 2014 04:03:52 PM UTC, comment #1: 

This is related to bug #39495 and fixed in development sources. You can see the output of "demo compass" with a current default version here: http://tech-chat.de/compare_plot_demos/fltk/compass_01.png

Andreas Weber <andy1978>
Group Member
Thu 24 Jul 2014 03:45:47 PM UTC, original submission:  

Compass plot does not show angles on axis but when code is run in matlab it does show the angles on the axis.


clear all,clc
x_angle=[45,90,123,43,53,23,53,12];
y_amp=[1,.5,.4,.1,.6,.3,.7,.3];
%[x,y]=pol2cart([45 90]*pi/180,1);
[x_cart,y_cart]=pol2cart([x_angle.-180]*pi/180,y_amp);
h = compass(x_cart,y_cart);

for k = 1:length(x_cart)
    a_x = get(h(k), 'xdata');
    b_y = get(h(k), 'ydata');
%To delete the arrows you need to delete all but the first two entries in the xdata and ydata fields of the plot. The color can be changed by setting the color property. Please find below a solution for compass plots with arbitrary numbers of arrows.
    set(h(k), 'xdata', a_x(1:2), 'ydata', b_y(1:2), 'color', 'r')
end;


Rick T <ratulloch>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by andy1978 (Posted a comment)
  • -email is unavailable- added by ratulloch (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 group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-07-24 rik5 Item GroupIncorrect Result Matlab Compatibility
        StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code