Filter löschen
Filter löschen

Change the transparency/alpha of data brushing

3 Ansichten (letzte 30 Tage)
Scott Smith
Scott Smith am 31 Mai 2023
Beantwortet: Nithin Kumar am 6 Jun. 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

Antworten (1)

Nithin Kumar
Nithin Kumar am 6 Jun. 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.

Kategorien

Mehr zu Graphics Performance finden Sie in Help Center und File Exchange

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by