New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MarkerFaceColor not parsed correctly #1082
Comments
I haven't looked at the code but my assumption would be that the second color that you see is meant to be the color of the surrounding. You might want to have a look here and fix the wrong fill Unfortunately I do not have access to MATLAB anymore so I cannot really help |
Thank you, that helped. I changed: % get the marker color right
markerInfo = getMarkerInfo(m2t, h, markOptions);
[m2t, markerInfo.options] = setColor(m2t, h, markerInfo.options, 'fill', markerInfo.FaceColor);
if ~strcmpi(markerInfo.EdgeColor,'auto')
[m2t, markerInfo.options] = setColor(m2t, h, markerInfo.options, '', markerInfo.EdgeColor);
else
if isprop(h,'EdgeColor')
color = get(h, 'EdgeColor');
else
color = get(h, 'Color');
end
[m2t, markerInfo.options] = setColor(m2t, h, markerInfo.options, '', color);
end to % get the marker color right
markerInfo = getMarkerInfo(m2t, h, markOptions);
[m2t, markerInfo.options] = setColor(m2t, h, markerInfo.options, 'fill', markerInfo.FaceColor);
if ~strcmpi(markerInfo.EdgeColor,'auto')
[m2t, markerInfo.options] = setColor(m2t, h, markerInfo.options, 'draw', markerInfo.EdgeColor); %changed '' to 'draw'
else
if isprop(h,'EdgeColor')
color = get(h, 'EdgeColor');
else
color = get(h, 'Color');
end
[m2t, markerInfo.options] = setColor(m2t, h, markerInfo.options, 'draw', color); %changed '' to 'draw'
end |
Wait wait wait: Would you care to fix this issue for others too? If so a pull request would be highly appreciated |
Hello community!
This Matlab-code (R2020a):
leads to the following tikz graphics:
but the markers should be filled white:
In the tikz-code, you can see the problem:
matlab2tikz parsed two colors to the fill option:
mark options={solid, fill=white, black}
If I correct the tikz-file to
mark options={solid, fill=white}
everything is fine.
In Matlab
get(h, 'MarkerFaceColor');
returns just one color:
[1,1,1]
Why does matlab2tikz parse two colors to the mark options? Is there a solution for this?
Thanks,
regards
Stefan
The text was updated successfully, but these errors were encountered: