Borrar filtros
Borrar filtros

Change the transparency/alpha of data brushing

3 visualizaciones (últimos 30 días)
Scott Smith
Scott Smith el 31 de Mayo de 2023
Respondida: Nithin Kumar el 6 de Jun. de 2023
Simple question, I'd like to change the transparency/alpha of the red brushed data points.
Is there any way to do this?
I know you can change the color, to blue like this
b = brush;
b.Color = [0 0 1]
And to get the brushed data (after brushing, in a callback)
get(b,'BrushedData') %hidden property...
But I'd like to change the transparency that matlab uses when brushing data, specifically a brushed scatter plot

Respuestas (1)

Nithin Kumar
Nithin Kumar el 6 de Jun. de 2023
Hi Scott,
To change the transparency of a brushed scatter plot, kindly refer to the following example.
x = rand(100,1);
y = rand(100,1);
scatter(x,y)
brush on
brushedDataHandle = findobj(gcf, 'Tag', 'brushed'); % findobj function is used here to get the handle to the brushed data points
set(brushedDataHandle, 'MarkerFaceAlpha', 0.5);
drawnow
For more information regarding “MarkerFaceAlpha” property, refer to the following documentation.
I hope this answer helps you.

Categorías

Más información sobre Graphics Performance en Help Center y File Exchange.

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by