Scatter not working v R2015a
Scatter plots are not working in version R2015a.
Can reproduce.
function scatter_test()
%SCATTER_TEST Demonstrates the need for a small patch.
badMarkerTypes = {'+', '*', 'x', 's', 'd', 'p', 'h', '^', '<', '>'};
testResults = cellfun(@try_to_convert_scatterplot, badMarkerTypes);
fprintf(1, '%d out of %d marker types succeeded.\n', sum(testResults), numel(testResults));
end
function success = try_to_convert_scatterplot(markerType)
testOutputFilename = 'scatter_test.svg';
h = figure;
cleanupFigure = onCleanup(@()close(h));
scatter(1:10, 1:10, markerType);
cleanupFile = onCleanup(@()close_and_clean_file(testOutputFilename));
try
plot2svg(testOutputFilename, h);
catch exc
warning('Marker type "%s" failed to convert. Message is "%s"', markerType, exc.message);
success = 0;
return;
end
success = 1;
end
function close_and_clean_file(filename)
fclose all;
delete(filename);
end
I have a fix for this, hang on while I pullrequestify it.
Amazing :-). Will check tomorrow.
Best regards,
Carl Wouters Oil-Free Engineering - Calculations Competence Coach
On 14 Oct 2015 18:49, Ben Ellis [email protected] wrote:
I have a fix for this, hang on while I pullrequestify it.
Reply to this email directly or view it on GitHubhttps://github.com/jschwizer99/plot2svg/issues/6#issuecomment-148113858.
Hey Ben,
Any luck on getting it through? :-)
I'm not much experienced in the etiquette, but I don't particularly want to repay Juerg's hard work making plot2svg by nagging him...
For the time being, the change is committed to the master branch of my fork ( https://github.com/ble/plot2svg ) and you can get it there.
You can see the diff of the commit here: https://github.com/ble/plot2svg/commit/b6987af8f2adf92a3d3cd7816a5fcfb6e473c982
Since Matlab 2015a it has a build-in svg engine. Just type
saveas(gcf,filename,'svg')
It is by far not as perfect as plot2svg used to be, but at least it can be a start.
Hi,
I've been on this errand with the newer versions of Inkscape and Matlab as well. kromuchi solution unfortunately doesn't work even for slightly sophisticated plots such as mesh surface and 3dplots (the text is embedded on the plot).
Hello.
I have the same issue with R2016a:
Warning: Unhandled child type: scatter
Fixed in my fork: https://github.com/kupiqu/plot2svg
just wanted to let you know about the first release of fig2svg which fixes this issue:
https://github.com/kupiqu/fig2svg