Graph visualization adding white to my nodes. How to solve it?

Hello everyone,
I am having a problem with my graph visualization. In particular, my nodes are not being presented only in the colour selected, but they also have some white parts. In addition, these white parts are not "static", with every step of the loop (which changes the colour of one node at a time) there is a change in which part of each node is drawn in white.
I am posting an image of what I’m seeing:
I have already tried the same code on a different computer and the problem doesn’t persist. So I am guessing there is some setting I can adjust to solve this.
Thanks in advance for your collaboration!

댓글 수: 1

I have changed the marker symbol and the problem disapears, so there must be something special with circles.

댓글을 달려면 로그인하십시오.

 채택된 답변

Christine Tobler
Christine Tobler 2019년 11월 12일
I'd assume this problem will also happen with other graphics elements. Could you try the following code and let me know if you're seeing the same issue there?
scatter(randn(10,1), randn(10,1), 'o', 'MarkerFaceColor', 'b', 'MarkerEdgeColor', 'b')

댓글 수: 5

Hello,
Yes, you are right! Same problem when I make that scatter diagram.
Here is a screenshot of that plot:
scatter.jpg
Great, thanks. Then this seems to be similar issue as the one here:
Maybe the workaround there,
set(gcf, 'renderer', 'painters')
will fix the issue?
Yes! Your are a genius!
And if I use:
set(0, 'DefaultFigureRenderer', 'painters')
It will solve the problem for the entire MATLAB session. However, if I close MATLAB and open it again, I would have to run that line again. Is there any way to change the setting so that I don't have to use that line of code every time I reopen the program?
Thank you very much,
Lucio.
You could place it in a startup.m file in the folder whose path is returned by userpath or in another directory that is on the MATLAB path when MATLAB starts.
I'll try that.
Thank you all for your help!

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Steven Lord
Steven Lord 2019년 11월 11일

0 개 추천

Can you check if there's an update available for your graphics driver?
If not, did this behavior suddenly start appearing (after a graphics driver update or a Windows update?) If it occurred after a graphics driver update, consider reverting that update to determine if it's a bug in the driver.

댓글 수: 1

Hello,
My grahics driver is updated.
About your second question. I had an older version of MATLAB and got the 2017b version because the function I am using does not work on the one I had. So I have not done this type of graphs before.

댓글을 달려면 로그인하십시오.

Arash Rabbani
Arash Rabbani 2019년 11월 12일

0 개 추천

This is a visual artifact I assume. Try add Edge Color to your nodes. It could help.

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

질문:

2019년 11월 11일

댓글:

2019년 11월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by