[scilab-Users] Plotting matrix
Mathieu Dubois
mathieu.dubois at limsi.fr
Fri Oct 15 13:24:30 CEST 2010
Hello,
Thanks to Samuel I have a working function (see attachment). To plot
arbitrary values the function first scales them in [0,1] so very low
values are represented with small circles and colours from the bottom of
the colormap and high values with circles of diameter close to 1 (and
colours from the top of the colormap). The parameter threshold is used
to represent very low values (in the current version this introduces a
slight bias).
The function works reasonably well but to be complete:
- the parameter threshold (which specify what to do with very low
values) should be optional
- the user should be able to give the scaling parameters (for instance
to represent sevral matrices with the same colorscale)
I will find time to do that.
The function is named Matplot2 because it's like Matplot and Matplot1.
It would be nice to include it into scilab... I can fill a request on
bugzilla...
By the way I have seen that scilab supports named parameters but I
didn't find documentation/examples. My question:
- how can I use named parameters?
- can I set a default value for a named parameter?
This would be a nice alternative to varargin...
Mathieu
On 10/15/2010 10:55 AM, Mathieu Dubois wrote:
> On 10/15/2010 09:31 AM, Samuel GOUGEON wrote:
>> Hello Mathieu,
>>
>> ----- Message d'origine -----
>> De : Mathieu Dubois
>> Date : 14/10/2010 21:02:
>>> Hello,
>>>
>>> I would like to represent data in a matrix by coloured small circles
>>> (for gnuplot users I want to reproduce something like the "with
>>> points" option).
>>>
>>>
>>> The following script works but is rather slow. axis is a handle the
>>> axes and h a handle to the figure (it is hidden before the script
>>> and then reshowed to speed up the rendering).
>>> The data are probabilities so the scaling is simple. The circles are
>>> approximated by 10 facets polygons which is not very beautiful. The
>>> probability gives the radius of the circle and its colour.
>> Why not using
>>
>> drawlater
>> //... loop (if really needed. Is it?)
>> xfarcs(...)
>> // ... end of loop
>> drawnow
>>
>> ?
>>
>>
> Thanks for your suggestion! I'm working on it (and it looks
> promising). I will sent it to the list...
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Matplot2.sci
URL: <https://lists.scilab.org/pipermail/users/attachments/20101015/72253d00/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test_Matplot2.sce
URL: <https://lists.scilab.org/pipermail/users/attachments/20101015/72253d00/attachment-0001.ksh>
More information about the users
mailing list