[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #42836] Compass plot does not show angles on a
From: |
Rick T |
Subject: |
[Octave-bug-tracker] [bug #42836] Compass plot does not show angles on axis |
Date: |
Thu, 24 Jul 2014 15:45:48 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 |
URL:
<http://savannah.gnu.org/bugs/?42836>
Summary: Compass plot does not show angles on axis
Project: GNU Octave
Submitted by: ratulloch
Submitted on: Thu 24 Jul 2014 03:45:47 PM GMT
Category: Plotting
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Rick T
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 3.8.1
Operating System: GNU/Linux
_______________________________________________________
Details:
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;
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?42836>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #42836] Compass plot does not show angles on axis,
Rick T <=