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

Not working on Matlab 2017b? #10

Open
i2000s opened this issue Oct 13, 2017 · 4 comments
Open

Not working on Matlab 2017b? #10

i2000s opened this issue Oct 13, 2017 · 4 comments

Comments

@i2000s
Copy link

i2000s commented Oct 13, 2017

I installed Matlab 2017b, and found the script will remove some colored areas. For example,

Code:

contourf(peaks(100));saveas(gcf,'figure.eps','epsc')
epsclean('figure.eps','figure_clean.eps','GroupSoft',true,'combineAreas',true,'removeboxes',true)

Generates the following (I converted from eps to pdf for this preview):

figure_clean.pdf

figure.pdf

Do you have any idea? Thank you for making this tool, regardless!

@i2000s
Copy link
Author

i2000s commented Oct 14, 2017

Since Matlab 2017b has fixed the patch line issue (see here), maybe we don't need your script anymore? :)

Update*:

  • pcolor, surf and some other plots are not working on 2017b for exporting clean eps files. I was optimistic too early.

@Conclusio
Copy link
Owner

Since I don't have access to Matlab 2017b I can only speculate. Matlab is redefining postscript operators in their files it would be enough if that changed, but maybe it is something else...

If you can provide me with some raw eps files where my tool messes up I can have a look at what is happening.

@i2000s
Copy link
Author

i2000s commented Oct 16, 2017

Hi @Conclusio , please find the eps files attached. In the matlab.zip ball, figure.eps is generated with the default saveas function of Matlab; figure1.eps is generated with -painters option using export_fig package; figure2.eps is generated with -opengl option using export_fig function. *_clean.eps files are the corresponding figures using your tool. I am sure the eps code is redefined in Matlab 2017b, so you will see that some color in figure_clean.eps got lost, and there is nothing inside of figure1_clean.eps and figure2_clean.eps. I hope you have an idea on what's going on.
Matlab.zip

The tool will be very helpful if it can handle surf, pcolor and other plots. I also attached an example of using saveas for a surf(peaks(100)); shading interp; figure in figure3.zip ball. As you can see, it's very messy. I haven't found any tools that can handle this type of figures well enough.

figure3.zip

Let me know if you need something else. Thanks.

@Conclusio
Copy link
Owner

Very helpful, thank you.

It seems that Matlab changed the file commands depending on how eps files are saved.

  • figure.eps works if "combineAreas" is false, otherwise it doesn't. Need to investigate further...
  • figure1.eps, figure2.eps have clearly different commands now, therefore empty files are created
  • figure3.eps still can be cleaned, but the results will not change much or might have wrong z-ordering. Those results are consistent with Matlab 2016b - so sadly it never worked correctly.

So overall, a lot of problems :( - fixing these would take some hours and even then I'm not certain I can create "clean" files.

I will keep you updated on any progress, but my schedule is quite full at the moment - so not in the near future.

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

2 participants