[Scilab-users] cannot get polarplot to graph a decent windrose
Samuel Gougeon
sgougeon at free.fr
Mon Mar 25 12:17:05 CET 2019
Hello Heinz,
Le 24/03/2019 à 16:18, Heinz Nabielek a écrit :
> First polarplot problem was to put 0 on top and 90° to the right. This problem was solved by Federico using gca().rotation_angles = [180 0]
>
> x = (0:360)/180*%pi;
> y = 0.5*(1 + cos(x));
> polarplot(x, y)
> gca().rotation_angles = [180 0]
Yes, this is the trick. It work since Scilab 6.0.2. Before, labels were
shifted when rotating the axes. This was recently corrected in order to
use this trick. It is now being documented
<http://bugzilla.scilab.org/show_bug.cgi?id=5693>.
> ______
> Second problem:
>> plot several curves in polar mode is to use matrices as input, as for the plot() and plot2d() functions
> does not work....
> x = (0:360)'/180*%pi;
> z=[(0.5*(1 + cos(x))) (0.5+(1 + cos(x)))];
> polarplot(x,z);
>
> produces the ERROR MESSAGE
>> at line 18 of function polarplot ( /Applications/scilab-6.0.2.app/Contents/MacOS/share/scilab/modules/graphics/macros/polarplot.sci line 31 )
>> Inconsistent row/column dimensions.
To be reported. This occurs since the first ages of Scilab. This clearly
deserves to be fixed.
The behavior should be the plot() and plot2d() one.
As a workaround before Scilab 6.1.0, the following code may be used:
x = (0:360)'/180*%pi;
z = [(0.5*(1 + cos(x))) (0.5+(1 + cos(x)))];
polarplot(x*ones(z(1,:)), z)
Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20190325/284e6dae/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fpjinkeflcnjegfe.png
Type: image/png
Size: 6859 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20190325/284e6dae/attachment.png>
More information about the users
mailing list