help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there an easy way to create a plot with filled markers?


From: Juan Pablo Carbajal
Subject: Re: Is there an easy way to create a plot with filled markers?
Date: Wed, 24 Sep 2014 10:19:12 +0200

On Wed, Sep 24, 2014 at 9:48 AM, JokerOne
<address@hidden> wrote:
> Hi all,
>
> I am looking for an easy way to create a plot with filled markers.
>
> I hope, that the following example code will clearify my point:
>
> graphics_toolkit('gnuplot');
> setenv GNUTERM windows;
>
> %       example plot
> a = rand(4);
> figure(1);      % circles
> plot(a,'o');
>
>
> %       same plot with filled markers --> quite complicate!
> colormap_plot   =        get(gca(),'colororder');
> figure(2)
> for c1 = 1:4
>
> plot(a(:,c1),'o','color',colormap_plot(c1,:),'markerfacecolor',colormap_plot(c1,:));
>         hold on
> endfor
> hold off;
>
> figure(3) %     easier way of creating figure(2) ??
> plot(a,'o','filled'); % ???
> % or at least anything that will get rid of the for loop, like
> plot(a,'o','color',colormap_plot(1:4,:),'markerfacecolor',colormap_plot(1:4,:));
> % ???
>
>
> Any help is appreciated!
>
> Max
>
>
>
>
>
> --
> View this message in context: 
> http://octave.1599824.n4.nabble.com/Is-there-an-easy-way-to-create-a-plot-with-filled-markers-tp4666672.html
> Sent from the Octave - General mailing list archive at Nabble.com.
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-octave

x = rand (10,2);
plot(x(:,1),x(:,2),'.','markersize', 12);

or
scatter (x(:,1),x(:,2),12,"filled")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]