[Scilab-users] Random colours for plot markers
arctica1963
arctica1963 at gmail.com
Sat Jun 27 09:32:28 CEST 2020
Hello,
I would like to generate random colours for the markers in a polar plot (for
example), but not sure what is needed.
adding: f.color_map = rand(jetcolormap(64)); will give random colours for
each new plot, but what I would like to try is to randomise the colours of
the markers. In the following script, the polar plot generates point markers
but all red, is it possible to plot with random colours?
clear
clf()
// Enter the upper range
x = input("Enter the upper range : ");
angle=180/%pi;
p=primes(x);
rad=p;
theta=p*angle;
f = gcf();
f.figure_size=[1024,1024];
a=gca();
a.tight_limits=["on", "on"]
a.mark_mode="on"
a.mark_style=0
a.mark_size_unit="point"
a.mark_size=3
a.mark_foreground = 21 // <- sets the current marker colour from figure
properties
// plot the prime number in polar coordinates
polarplot(theta,rad,style=0)
Thanks for any pointers
Lester
--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
More information about the users
mailing list