Re: [Scilab-users] Scatter plot with fixed marker dimension and overlap analysis

2023-03-20 Thread Stéphane Mottelet
Thanks Charles, but can you be more precise about your sentence

2. is there a way to calculate the overlap on the area through the chart with a 
heat map for example?

because the “heat map” is just a way of representing a scalar field, and what 
is exactly this scalar field you are interested in is not that clear.

My first understanding was that you were interested in the total covered area, 
which is associated to a binary map. If you are interested in a quantified map 
counting for each (x,y) coordinate pair the number of impacts covering it, then 
you can define such a map, but what is the computation to compute “the overlap 
on the area”.

S.

Le 20 mars 2023 à 13:58, charles marcotte  a écrit :


Stephane, Federico,

Thank you very much for answering my questions.
I have seen the first message from Federico and implemented such an idea.
So now I have a working impact visualization.

I had first to translate the curves onto a matrix, then for the adjacent points 
part of the impact area were colored. Using Matplot it was easy to plot the 
matrix but annoyingly it is mixing up x and y but nothing horrible for now.
I have not yet implemented the heat map. I will read through the comments.
Probably not the most efficient code but I started scilab one week ago and last 
time I used Matlab was more than 20 years ago so I am ok with that.


//modeling the impact
mega(x1(1,i),y1(1,i))=8
mega(x2(1,i),y2(1,i))=8
for q=1:1:R
for m=0:0.03:%pi
tempx1=round(x1(1,i)+q*cos(m));
tempy1=round(y1(1,i)+q*sin(m));
tempx2=round(x2(1,i)+q*cos(m));
tempy2=round(y2(1,i)+q*sin(m));
if tempx1<0 | tempy1<0 then
else
mega(tempx1,tempy1)=8
end
 if tempx2<0 | tempy2<0 then
else
mega(tempx2,tempy2)=8
end
end
end
end
Matplot(mega)
end


On Thu, Mar 16, 2023 at 11:45 AM charles marcotte 
mailto:charles.marco...@gmail.com>> wrote:
Hello,

I have 2d scatter plot where each marker represents an impact point. The impact 
point has a defined area.
1.  I am trying to assign each point the impact area to visualize how much of 
the surface is impacted.
Defining the marker size does not work because I change the scale between 
simulations and I can't find a definition of the marker size vs diameter or 
perimeter.

2. is there a way to calculate the overlap on the area through the chart with a 
heat map for example?

Thank you
Charles

This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/


___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users

This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Scatter plot with fixed marker dimension and overlap analysis

2023-03-20 Thread charles marcotte
Stephane, Federico,

Thank you very much for answering my questions.
I have seen the first message from Federico and implemented such an idea.
So now I have a working impact visualization.

I had first to translate the curves onto a matrix, then for the adjacent points 
part of the impact area were colored. Using Matplot it was easy to plot the 
matrix but annoyingly it is mixing up x and y but nothing horrible for now.
I have not yet implemented the heat map. I will read through the comments.
Probably not the most efficient code but I started scilab one week ago and last 
time I used Matlab was more than 20 years ago so I am ok with that.


//modeling the impact
mega(x1(1,i),y1(1,i))=8
mega(x2(1,i),y2(1,i))=8
for q=1:1:R
for m=0:0.03:%pi
tempx1=round(x1(1,i)+q*cos(m));
tempy1=round(y1(1,i)+q*sin(m));
tempx2=round(x2(1,i)+q*cos(m));
tempy2=round(y2(1,i)+q*sin(m));
if tempx1<0 | tempy1<0 then
else
mega(tempx1,tempy1)=8
end
 if tempx2<0 | tempy2<0 then
else
mega(tempx2,tempy2)=8
end
end
end
end
Matplot(mega)
end


On Thu, Mar 16, 2023 at 11:45 AM charles marcotte 
mailto:charles.marco...@gmail.com>> wrote:
Hello,

I have 2d scatter plot where each marker represents an impact point. The impact 
point has a defined area.
1.  I am trying to assign each point the impact area to visualize how much of 
the surface is impacted.
Defining the marker size does not work because I change the scale between 
simulations and I can't find a definition of the marker size vs diameter or 
perimeter.

2. is there a way to calculate the overlap on the area through the chart with a 
heat map for example?

Thank you
Charles

This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Scatter plot with fixed marker dimension and overlap analysis

2023-03-17 Thread Heinz Nabielek
Very interesting display and very interesting piece of coding. I think I will 
be able to use it in one of my display of spherical objects.
Heinz

> On 18.03.2023, at 06:15, Federico Miyara  wrote:
>
> // Image size
> n = 500;
> m = 800;
> // Impact area radius
> R = 20;
> // Number of impacts
> N = 200;
> // Generate test random impact points
> IPx = 1 + floor(m*rand(1,N));
> IPy = 1 + floor(n*rand(1,N));
> X=IPx; [min(X) mean(X) max(X) stdev(X)]
> X=IPy; [min(X) mean(X) max(X) stdev(X)]
> // Plot impacts
> scf(1);
> clf(1);
> plot(IPx, IPy,"o");
> xgrid(color('grey70'));
> // Initialize matrix to contain image
> A = zeros(n,m);
> // Navigate impacts
> for k=1:N
>// Horizontal range for kth impact
>x1 = max(IPx(k) - R, 1);
>x2 = min(IPx(k) + R, m);
>for i=x1:x2
>   // Vertical range for kth impact and ith horizontal pixel
>   y1 = IPy(k) - sqrt(R^2 - (i - IPx(k))^2);
>   y2 = IPy(k) + sqrt(R^2 - (i - IPx(k))^2);
>   y1 = max(y1, 1);
>   y2 = min(y2, n);
>   // Overlap
>   A(y1:y2, i) = A(y1:y2, i) + 1;
>end
> end
> scf(2);
> clf(2);
> gcf().color_map = jetcolormap(64);
> Sgrayplot([1:m],[1:n],A')
> isoview on
___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users
This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/



Re: [Scilab-users] Scatter plot with fixed marker dimension and overlap analysis

2023-03-17 Thread Federico Miyara


Stéphane,

I'm sorry if my message seemed to you an attack to your code, it was not my 
intention and I apologize.

Charles has never answered till now, but the concept of heat map is known 
(wikipedia has an entry on it).

You are right that wavread() and imread() are not comparable (even if wavread 
is a much more general container than generally known, allowing any kind of 
compressed and uncompressed formats, which, certainly, the function does not 
honor). However, there could be a bmpread() function. In fact, I've created my 
own bmpread(), a simple one that doesn't cover all formats but at least deals 
with the basic ones I needed for my usage case (automatic parametrization of 
printed and scanned graphs). It is available if anyone needs it (just ask).

As to your observation on the lack of a code implementing my idea, Charles had 
asked if there is a way to calculate the heat map, which not necessarily means 
a working code. Often just an enunciation of the idea of an algorithm is 
sufficient for a person to translate it into code. Personally I prefer to 
understand the idea behind an algorithm rather than being provided with a code, 
since it is difficult for me to read other people's code, particularly when I 
will need to change many things such as variable names, comments and so on. But 
you are right again that a code would be better, so I took a time to write it. 
Find it below. Assuming the data are given (here, as you did, I simulate the 
data), the core of the algorithm is the for loop with the initialization of the 
matrix representing the image.

Regards and sorry again.

Federico Miyara



// Image size
n = 500;
m = 800;
// Impact area radius
R = 20;
// Number of impacts
N = 200;
// Generate test random impact points
IPx = 1 + floor(m*rand(1,N));
IPy = 1 + floor(n*rand(1,N));

// Plot impacts
scf(1);
clf(1);
plot(IPx, IPy,"o")

// Initialize matrix to contain image
A = zeros(n,m);
// Navigate impacts
for k=1:N
  // Horizontal range for kth impact
  x1 = max(IPx(k) - R, 1);
  x2 = min(IPx(k) + R, m);
  for i=x1:x2
 // Vertical range for kth impact and ith horizontal pixel
 y1 = IPy(k) - sqrt(R^2 - (i - IPx(k))^2);
 y2 = IPy(k) + sqrt(R^2 - (i - IPx(k))^2);
 y1 = max(y1, 1);
 y2 = min(y2, n);
 // Overlap
 A(y1:y2, i) = A(y1:y2, i) + 1;
  end
end

scf(2);
clf(2);
gcf().color_map = jetcolormap(64);
Sgrayplot([1:m],[1:n],A')
isoview on




On 17/03/2023 18:39, Stephane Mottelet wrote:

Hello,

I think we should let Charles explain what he wants. Particularly he should 
explain what is the heat map he is talking about. Concerning your claim about 
imread, you cannot compare it with wavread. There are far more different image 
formats than audio formats ! This explain why imread and imwrite are part of 
image processing packages. Concerning your claims about missing features, I 
found them legitimate, but they should be directed to the communit :  don't 
expect the core team to do everything ! For example, you have described a 
method to solve Charles problem. So before critisizing proposed method below 
(with a working code) you should propose a code implementing your solution, 
don't you think so ?

S.

---
Stephane Mottelet


Le 2023-03-17 22:23, Federico Miyara a écrit :

Stéphane,

There are two problems with this approach. The first one is that there is no way to know how many 
disks cover a given point so the "heat map" would have only two levels: a given point 
belongs or not to the impact area. Charles hasn't carified, but the term "heat map" he 
used suggests a graded plot. The second problem is that you need to resource to a function not 
directly available in Scilab so you need to install a toolbox. Moreover, you need to create an 
intermediate file.

By the way, I always wondered why imread() isn't part of Scilab's core, as is 
wavread(). Maybe image processing is a very specialized subject demanding a 
complete toolkit to deal with it, but some basic functions like imread() or 
imwrite() would be very handy to ensure easy interoperabilty with other 
software packages.

It is also a pity that xs2bmp() cannot provide an array output with the pixel 
data corresponding to the figure image (2x2x3 for color graphs).

Regards,

Federico Miyara


On 17/03/2023 12:17, Stéphane Mottelet wrote:

Hello,

I would propose this solution, inspired by my remark abour using xfarcs and the bitmap idea from 
Frederico. The idea is to plot the disks then export the graph under a bitmap format, the read the 
image back (needs "imread" e.g.from IPCV) then count the black pixels ("true" 
value in x below). The ratio between black pixels and total number of pixels gives you the 
proportion of covered area:

clf

n = 17;
xc = grand(1,n,"unf",0,5);
yc = grand(1,n,"unf",0,5);
radius = grand(1,n,"unf",0,1);

drawlater
arcs=[xc-radius
yc-radius
2*radius
2*radius
zeros(1,n)
   zeros(1,n)+360*64];
st=ones(1,n);
a1 = newaxes();
a1.margins=[0 0 0 

Re: [Scilab-users] Scatter plot with fixed marker dimension and overlap analysis

2023-03-17 Thread Stephane Mottelet

Hello,

I think we should let Charles explain what he wants. Particularly he should 
explain what is the heat map he is talking about. Concerning your claim about 
imread, you cannot compare it with wavread. There are far more different image 
formats than audio formats ! This explain why imread and imwrite are part of 
image processing packages. Concerning your claims about missing features, I 
found them legitimate, but they should be directed to the communit :  don't 
expect the core team to do everything ! For example, you have described a 
method to solve Charles problem. So before critisizing proposed method below 
(with a working code) you should propose a code implementing your solution, 
don't you think so ?

S.

---
Stephane Mottelet


Le 2023-03-17 22:23, Federico Miyara a écrit :

Stéphane,

There are two problems with this approach. The first one is that there is no way to know how many 
disks cover a given point so the "heat map" would have only two levels: a given point 
belongs or not to the impact area. Charles hasn't carified, but the term "heat map" he 
used suggests a graded plot. The second problem is that you need to resource to a function not 
directly available in Scilab so you need to install a toolbox. Moreover, you need to create an 
intermediate file.

By the way, I always wondered why imread() isn't part of Scilab's core, as is 
wavread(). Maybe image processing is a very specialized subject demanding a 
complete toolkit to deal with it, but some basic functions like imread() or 
imwrite() would be very handy to ensure easy interoperabilty with other 
software packages.

It is also a pity that xs2bmp() cannot provide an array output with the pixel 
data corresponding to the figure image (2x2x3 for color graphs).

Regards,

Federico Miyara


On 17/03/2023 12:17, Stéphane Mottelet wrote:

Hello,

I would propose this solution, inspired by my remark abour using xfarcs and the bitmap idea from 
Frederico. The idea is to plot the disks then export the graph under a bitmap format, the read the 
image back (needs "imread" e.g.from IPCV) then count the black pixels ("true" 
value in x below). The ratio between black pixels and total number of pixels gives you the 
proportion of covered area:

clf

n = 17;
xc = grand(1,n,"unf",0,5);
yc = grand(1,n,"unf",0,5);
radius = grand(1,n,"unf",0,1);

drawlater
arcs=[xc-radius
yc-radius
2*radius
2*radius
zeros(1,n)
   zeros(1,n)+360*64];
st=ones(1,n);
a1 = newaxes();
a1.margins=[0 0 0 0];
xfarcs(arcs,st);
a1.data_bounds = [0,5,0,5];
isoview on
s=gcf().axes_size;
gcf().axes_size=[400 400]
drawnow

xs2bmp(0,"im.bmp");
x=imread("im.bmp");

disp(sum(x)/size(x,"*"))

S.

Le 16/03/2023 à 18:43, Federico Miyara a écrit :

Charles,

I assume the area of each impact point is circular (but it could be abapted for 
other forms). Then you could start with a n*m matrix filled with zeros. Then, 
according to a convenient scale, each impact point is approximated by a 
component of the matrix. The horizontal and vertical positions (column and row) 
will represent quantized coordinates.

Then, if the coordinates of an impact point ar p (column) and q (row) and the 
radius of its impact area is R, expressed using the same scale, for column k = 
(p - R):(p + R) you add 1 to the rows from q - sqrt(R^2-k^2) to q + 
sqrt(R^2-k^2).

You repeat that for all impact points (with a for loop) and at the end you have 
that each component of the matrix (which represent pixels) will be exactly the 
number of overlapping areas at the location represented by the component. For 
instance, if at component u, v you have 7, that means 7 impact areas contain 
that component.

This could be adapted even to a graded impact area, replacing 1 by the result 
of a function with a maximum at the center fading down to 0 at the perimeter of 
the impact area

You must be careful near the boundary so that components don't exceed the 
limits (for instance, not smaller than 1 or greater than n or m)

This is not probably the most efficient way, but assuming the impact area is 
small it should work fine and reasonably fast for a few thousand impact points.

Regards.

Federico Miyara


On 16/03/2023 00:45, charles marcotte wrote:
Hello,

I have 2d scatter plot where each marker represents an impact point. The impact 
point has a defined area.
1.  I am trying to assign each point the impact area to visualize how much of 
the surface is impacted.
Defining the marker size does not work because I change the scale between 
simulations and I can't find a definition of the marker size vs diameter or 
perimeter.

2. is there a way to calculate the overlap on the area through the chart with a 
heat map for example?

Thank you
Charles

This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in 

Re: [Scilab-users] Scatter plot with fixed marker dimension and overlap analysis

2023-03-17 Thread Federico Miyara


Stéphane,

There are two problems with this approach. The first one is that there is no way to know how many 
disks cover a given point so the "heat map" would have only two levels: a given point 
belongs or not to the impact area. Charles hasn't carified, but the term "heat map" he 
used suggests a graded plot. The second problem is that you need to resource to a function not 
directly available in Scilab so you need to install a toolbox. Moreover, you need to create an 
intermediate file.

By the way, I always wondered why imread() isn't part of Scilab's core, as is 
wavread(). Maybe image processing is a very specialized subject demanding a 
complete toolkit to deal with it, but some basic functions like imread() or 
imwrite() would be very handy to ensure easy interoperabilty with other 
software packages.

It is also a pity that xs2bmp() cannot provide an array output with the pixel 
data corresponding to the figure image (2x2x3 for color graphs).

Regards,

Federico Miyara


On 17/03/2023 12:17, Stéphane Mottelet wrote:

Hello,

I would propose this solution, inspired by my remark abour using xfarcs and the bitmap idea from 
Frederico. The idea is to plot the disks then export the graph under a bitmap format, the read the 
image back (needs "imread" e.g.from IPCV) then count the black pixels ("true" 
value in x below). The ratio between black pixels and total number of pixels gives you the 
proportion of covered area:

clf

n = 17;
xc = grand(1,n,"unf",0,5);
yc = grand(1,n,"unf",0,5);
radius = grand(1,n,"unf",0,1);

drawlater
arcs=[xc-radius
yc-radius
2*radius
2*radius
zeros(1,n)
   zeros(1,n)+360*64];
st=ones(1,n);
a1 = newaxes();
a1.margins=[0 0 0 0];
xfarcs(arcs,st);
a1.data_bounds = [0,5,0,5];
isoview on
s=gcf().axes_size;
gcf().axes_size=[400 400]
drawnow

xs2bmp(0,"im.bmp");
x=imread("im.bmp");

disp(sum(x)/size(x,"*"))

S.

Le 16/03/2023 à 18:43, Federico Miyara a écrit :

Charles,

I assume the area of each impact point is circular (but it could be abapted for 
other forms). Then you could start with a n*m matrix filled with zeros. Then, 
according to a convenient scale, each impact point is approximated by a 
component of the matrix. The horizontal and vertical positions (column and row) 
will represent quantized coordinates.

Then, if the coordinates of an impact point ar p (column) and q (row) and the 
radius of its impact area is R, expressed using the same scale, for column k = 
(p - R):(p + R) you add 1 to the rows from q - sqrt(R^2-k^2) to q + 
sqrt(R^2-k^2).

You repeat that for all impact points (with a for loop) and at the end you have 
that each component of the matrix (which represent pixels) will be exactly the 
number of overlapping areas at the location represented by the component. For 
instance, if at component u, v you have 7, that means 7 impact areas contain 
that component.

This could be adapted even to a graded impact area, replacing 1 by the result 
of a function with a maximum at the center fading down to 0 at the perimeter of 
the impact area

You must be careful near the boundary so that components don't exceed the 
limits (for instance, not smaller than 1 or greater than n or m)

This is not probably the most efficient way, but assuming the impact area is 
small it should work fine and reasonably fast for a few thousand impact points.

Regards.

Federico Miyara


On 16/03/2023 00:45, charles marcotte wrote:
Hello,

I have 2d scatter plot where each marker represents an impact point. The impact 
point has a defined area.
1.  I am trying to assign each point the impact area to visualize how much of 
the surface is impacted.
Defining the marker size does not work because I change the scale between 
simulations and I can't find a definition of the marker size vs diameter or 
perimeter.

2. is there a way to calculate the overlap on the area through the chart with a 
heat map for example?

Thank you
Charles

This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/




___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 


Re: [Scilab-users] Scatter plot with fixed marker dimension and overlap analysis

2023-03-17 Thread Stéphane Mottelet

Hello,

I would propose this solution, inspired by my remark abour using xfarcs and the bitmap idea from 
Frederico. The idea is to plot the disks then export the graph under a bitmap format, the read the 
image back (needs "imread" e.g.from IPCV) then count the black pixels ("true" 
value in x below). The ratio between black pixels and total number of pixels gives you the 
proportion of covered area:

clf

n = 17;
xc = grand(1,n,"unf",0,5);
yc = grand(1,n,"unf",0,5);
radius = grand(1,n,"unf",0,1);

drawlater
arcs=[xc-radius
yc-radius
2*radius
2*radius
zeros(1,n)
   zeros(1,n)+360*64];
st=ones(1,n);
a1 = newaxes();
a1.margins=[0 0 0 0];
xfarcs(arcs,st);
a1.data_bounds = [0,5,0,5];
isoview on
s=gcf().axes_size;
gcf().axes_size=[400 400]
drawnow

xs2bmp(0,"im.bmp");
x=imread("im.bmp");

disp(sum(x)/size(x,"*"))

S.

Le 16/03/2023 à 18:43, Federico Miyara a écrit :

Charles,

I assume the area of each impact point is circular (but it could be abapted for 
other forms). Then you could start with a n*m matrix filled with zeros. Then, 
according to a convenient scale, each impact point is approximated by a 
component of the matrix. The horizontal and vertical positions (column and row) 
will represent quantized coordinates.

Then, if the coordinates of an impact point ar p (column) and q (row) and the 
radius of its impact area is R, expressed using the same scale, for column k = 
(p - R):(p + R) you add 1 to the rows from q - sqrt(R^2-k^2) to q + 
sqrt(R^2-k^2).

You repeat that for all impact points (with a for loop) and at the end you have 
that each component of the matrix (which represent pixels) will be exactly the 
number of overlapping areas at the location represented by the component. For 
instance, if at component u, v you have 7, that means 7 impact areas contain 
that component.

This could be adapted even to a graded impact area, replacing 1 by the result 
of a function with a maximum at the center fading down to 0 at the perimeter of 
the impact area

You must be careful near the boundary so that components don't exceed the 
limits (for instance, not smaller than 1 or greater than n or m)

This is not probably the most efficient way, but assuming the impact area is 
small it should work fine and reasonably fast for a few thousand impact points.

Regards.

Federico Miyara


On 16/03/2023 00:45, charles marcotte wrote:
Hello,

I have 2d scatter plot where each marker represents an impact point. The impact 
point has a defined area.
1.  I am trying to assign each point the impact area to visualize how much of 
the surface is impacted.
Defining the marker size does not work because I change the scale between 
simulations and I can't find a definition of the marker size vs diameter or 
perimeter.

2. is there a way to calculate the overlap on the area through the chart with a 
heat map for example?

Thank you
Charles

This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/




___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 

https://lists.scilab.org/mailman/listinfo/users





[Avast logo] 

El software de antivirus Avast ha analizado este correo electrónico en busca de 
virus.
www.avast.com



This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 

Re: [Scilab-users] Scatter plot with fixed marker dimension and overlap analysis

2023-03-16 Thread Federico Miyara


Charles,

I assume the area of each impact point is circular (but it could be abapted for 
other forms). Then you could start with a n*m matrix filled with zeros. Then, 
according to a convenient scale, each impact point is approximated by a 
component of the matrix. The horizontal and vertical positions (column and row) 
will represent quantized coordinates.

Then, if the coordinates of an impact point ar p (column) and q (row) and the 
radius of its impact area is R, expressed using the same scale, for column k = 
(p - R):(p + R) you add 1 to the rows from q - sqrt(R^2-k^2) to q + 
sqrt(R^2-k^2).

You repeat that for all impact points (with a for loop) and at the end you have 
that each component of the matrix (which represent pixels) will be exactly the 
number of overlapping areas at the location represented by the component. For 
instance, if at component u, v you have 7, that means 7 impact areas contain 
that component.

This could be adapted even to a graded impact area, replacing 1 by the result 
of a function with a maximum at the center fading down to 0 at the perimeter of 
the impact area

You must be careful near the boundary so that components don't exceed the 
limits (for instance, not smaller than 1 or greater than n or m)

This is not probably the most efficient way, but assuming the impact area is 
small it should work fine and reasonably fast for a few thousand impact points.

Regards.

Federico Miyara


On 16/03/2023 00:45, charles marcotte wrote:
Hello,

I have 2d scatter plot where each marker represents an impact point. The impact 
point has a defined area.
1.  I am trying to assign each point the impact area to visualize how much of 
the surface is impacted.
Defining the marker size does not work because I change the scale between 
simulations and I can't find a definition of the marker size vs diameter or 
perimeter.

2. is there a way to calculate the overlap on the area through the chart with a 
heat map for example?

Thank you
Charles

This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/




___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 

https://lists.scilab.org/mailman/listinfo/users





[Avast logo] 

El software de antivirus Avast ha analizado este correo electrónico en busca de 
virus.
www.avast.com



This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Scatter plot with fixed marker dimension and overlap analysis

2023-03-16 Thread Stéphane Mottelet

Hello Charles,

Le 16/03/2023 à 04:45, charles marcotte a écrit :
Hello,

I have 2d scatter plot where each marker represents an impact point. The impact 
point has a defined area.
1.  I am trying to assign each point the impact area to visualize how much of 
the surface is impacted.
Defining the marker size does not work because I change the scale between 
simulations and I can't find a definition of the marker size vs diameter or 
perimeter.

You should rather use xfarc 
(https://help.scilab.org/docs/6.1.1/en_US/xfarc.html) if you want the diameters 
in user units (not pixels). I suppose that you want to plot circular markers, 
is that the case ?

2. is there a way to calculate the overlap on the area through the chart with a 
heat map for example?

What do you mean by heat map as a computation technique (rather than a scalar 
field visualization method) ?

S.

Thank you
Charles

This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/




___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 

https://lists.scilab.org/mailman/listinfo/users


--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet


This email and any attachments are intended solely for the use of the 
individual or entity to whom it is addressed and may be confidential and/or 
privileged.

If you are not one of the named recipients or have received this email in error,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this email 
and all attachments,

(iii) Dassault Systèmes does not accept or assume any liability or 
responsibility for any use of or reliance on this email.


Please be informed that your personal data are processed according to our data 
privacy policy as described on our website. Should you have any questions 
related to personal data protection, please contact 3DS Data Protection Officer 
https://www.3ds.com/privacy-policy/contact/

___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
https://lists.scilab.org/mailman/listinfo/users