Borrar filtros
Borrar filtros

Scatter Plots, for Rolling data

3 visualizaciones (últimos 30 días)
Dharmesh Joshi
Dharmesh Joshi el 7 de Dic. de 2023
Editada: Star Strider el 7 de Dic. de 2023
HI
I have a large set of data, for example, spanning 6-12 months, that I need to represent in a scatter plot. However, this is a significant amount of data, so I would like to simplify it by implementing a rolling update method. This method would involve removing the oldest data and incorporating new data into the scatter plot. Can this be achieved with any standard library or function?

Respuesta aceptada

Star Strider
Star Strider el 7 de Dic. de 2023
Editada: Star Strider el 7 de Dic. de 2023
I am not certain that I fully understaznd what you want to do. Probably the easiest way to do that (without actually deleting any data) is to change the xlim range for the scatter plot. It can be updated fairly easily, although if the independent variable is a datetime value, the units provided to xlim would have to be datetime values as well.
That would go something like this —
D = datetime(2023,01,01)+days(0:100).';
NOx = sin(2*pi*(0:numel(D)-1)/10).' + randn(size(D));
figure
scatter(D, NOx, 25, day(D,'dayofyear'), 'filled')
grid
colormap(turbo)
figure
tiledlayout(4,1)
nexttile
scatter(D, NOx, 25, day(D,'dayofyear'), 'filled')
grid
colormap(turbo)
xlim([D(1) D(14)])
nexttile
scatter(D, NOx, 25, day(D,'dayofyear'), 'filled')
grid
colormap(turbo)
xlim([D(1) D(14)]+caldays(3))
nexttile
scatter(D, NOx, 25, day(D,'dayofyear'), 'filled')
grid
colormap(turbo)
xlim([D(1) D(14)]+caldays(60))
nexttile
scatter(D, NOx, 25, day(D,'dayofyear'), 'filled')
grid
colormap(turbo)
xlim([D(1) D(14)]+caldays(63))
EDIT — (7 Dec 2023 at 12:48)
Added gradient colours to the markers.
.

Más respuestas (0)

Categorías

Más información sobre Scatter Plots en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by