[Scilab-users] Matrix plot using Matplot syntax

Philipp Mühlmann p.muehlmann at gmail.com
Fri May 23 13:24:27 CEST 2014


mat = [ 0 1 ;1 0];
Matplot(mat);             // creates plot with black pixels
                                  // infact the black shading should
be different but maybe the difference is just not visible?

scale = 255;                     // parameter to define gray value

mat2 = mat .* scale
Matplot(mat2);          // the plot should now have black and white (255) pixel

hope this help
cheers,
Phil


2014-05-23 6:07 GMT+02:00 javed akram <jaavedakram at hotmail.com>:
> Hello everyone,
>
> Does anyone knows how to specify the color in Matplot ? I am trying to plot
> the matrix using Matplot and my matrix consist of 0 and 1. In Matplot black
> color is assigned for both 0 and 1. So, i can not distinguish between 0 and
> 1 while plotting the matrix.
>
> Your help will be really appreciated.
>
> Thanks
> Javed
>
>
>
> --
> View this message in context: http://mailinglists.scilab.org/Matrix-plot-using-Matplot-syntax-tp4030568.html
> Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users



-- 
There we have the salad.



More information about the users mailing list