Problem with plot graphics when using MarkerFaceColor in Windows 10
Mostra commenti meno recenti
Hi everyone,
I recently started to experience an issue when plotting data using scripts that previously worked well. I believe it might have someting to do with my windows graphics setting rather than Matlab itself but I couldn't find any solution so far. Below I have plotted a generic graph to better explain it. When using 'MarkerFaceColor', instead of having the usual Markers filled by the selected colour they appear irregular and noisy. This problem only shows up when using circles as Markers but not with other symbols and it seems to be independent from the size of the objects, the gca background colour, or the selected MarkerFaceColor.
Below the code that I have use to generate the attached plot.

clearvars; close all; clc;
h=plot([1 2 3],[ 4 2 7],'ko','MarkerSize',12,'MarkerFaceColor','r');
xlim([0 4]); ylim([1 8])
5 Commenti
dpb
il 14 Lug 2022
Well, that code seemed to have generated the expected result -- what generated the first?
I'd start w/ ensuring your video drivers are up to date -- you can change the 'renderer' setting to software/hardware and see if makes any difference.
W/ that old of a release that worked initially, almost certainly the issue is one that the system has had some updates installed that changed something in the graphics drivers...
Matt086
il 16 Lug 2022
Bruno Luong
il 16 Lug 2022
Can you do this then rerun your code
opengl software
Matt086
il 17 Lug 2022
dpb
il 17 Lug 2022
Try updating your graphics drivers, then...see which chipset your machine is using.
Risposte (1)
Rishita
il 15 Lug 2022
0 voti
h = plot(x, y, 'o'); set(h, {'MarkerFaceColor'}, get(h,'Color'));
2 Commenti
dpb
il 15 Lug 2022
>> x=1:4;y=rand(size(x));
>> h = plot(x, y, 'o'); set(h, {'MarkerFaceColor'}, get(h,'Color'));
Error using matlab.graphics.chart.primitive.Line/set
Invalid parameter/value pair arguments.
>>
???
Categorie
Scopri di più su Creating, Deleting, and Querying Graphics Objects in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

