Plot circles with alpha values in MATLAB

后端 未结 5 1535
执念已碎
执念已碎 2020-12-16 23:30

I\'m creating a scatter plot of some data, as you do, and I have a number of repeated data points which I\'d like to plot as circles with some alpha value so that piling on

5条回答
  •  忘掉有多难
    2020-12-17 00:04

    As far I can tell, there is no way to directly set alpha for markers in MATLAB. Patch methods fail to work well when alpha is set below about 0.03 or when there are far more than 10,000 markers.

    The workaround to generate publication quality graphics when you have a dense cloud of markers is to give the markers a unique color. Then print the figure to EPS. Then open in Illustrator, select all objects of that color and set the transparency and color of the objects in Illustrator. It's not the one-step solution one would hope for, but it does give much, much better looking results than using internal MATLAB functions and is quick, provided you have Illustrator or an equivalent vector graphics package.

提交回复
热议问题