Azzera filtri
Azzera filtri

Change the transparency/alpha of data brushing

3 visualizzazioni (ultimi 30 giorni)
Scott Smith
Scott Smith il 31 Mag 2023
Risposto: Nithin Kumar il 6 Giu 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

Risposte (1)

Nithin Kumar
Nithin Kumar il 6 Giu 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.

Categorie

Scopri di più su Graphics Performance in Help Center e File Exchange

Prodotti


Release

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by