Skip to content
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

Scatter not working v R2015a #6

Open
wouterscarl opened this issue Jun 16, 2015 · 10 comments
Open

Scatter not working v R2015a #6

wouterscarl opened this issue Jun 16, 2015 · 10 comments

Comments

@wouterscarl
Copy link

Scatter plots are not working in version R2015a.

@ble
Copy link

ble commented Oct 14, 2015

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

@ble
Copy link

ble commented Oct 14, 2015

I have a fix for this, hang on while I pullrequestify it.

@wouterscarl
Copy link
Author

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//issues/6#issuecomment-148113858.

@wouterscarl
Copy link
Author

Hey Ben,

Any luck on getting it through? :-)

@ble
Copy link

ble commented Oct 20, 2015

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: ble@b6987af

@kromuchi
Copy link

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.

@averter
Copy link

averter commented Jul 23, 2016

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).

@Pouya-moh
Copy link

Hello.
I have the same issue with R2016a:
Warning: Unhandled child type: scatter

@kupiqu
Copy link

kupiqu commented Jun 20, 2018

@kupiqu
Copy link

kupiqu commented Nov 26, 2018

just wanted to let you know about the first release of fig2svg which fixes this issue:

https://github.com/kupiqu/fig2svg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants