Hi, I am plotting inversion results in a pcolor-plot, where I specify the transparency of each data point in dependance on the certainty of the model parameter. NaN is assigned to some model parameters, which appear white. Due to the resolution of the inversion grid, the boundary between the areas for which I have values and the NaN area appears very blocky.
In a plot that uses no transpareny, I can easily plot a white polygon with the "fill"-command which results in a sharp boundary. However, when I plot the white polygon with FaceALpha=1 above transparent elements, I can still see those elements below the polygon.
Here is an example that shows the effect:
clear allclose all figurepolygon1=fill([1 3 3 1],[1 1 3 3],'r','FaceALpha',0.5);hold onpolygon2=fill([2 4 4 2],[2 2 4 4],'b','FaceALpha',1);polygon3=fill([2 4 4 2],[1 1 2 2],'w','FaceALpha',1);xlim([0 5])ylim([0 5])
The blue rectangle should cover the red one, why does the overlay appear purple then?
Best Answer