Giter Club home page Giter Club logo

fix_matlab_eps's People

Contributors

sbte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

fix_matlab_eps's Issues

Chunked image

Thanks for supporting python 3!

When trying on a flattened ribbon() figure, I get the following result:

capture

The following ribbons.zip contains the ribbons.fig to reproduce the image above.

I have Inkscape 0.91 r13725 (Jan 30 2015) and Ghostscript 9.19, but I get the following error if I try to open t with Ghostscript:

Error: /typecheck in --moveto--
Operand stack:
   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval-
-   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   fa
lse   1   %stopped_push   1967   1   3   %oparray_pop   1966   1   3   %oparray_
pop   --nostringval--   1950   1   3   %oparray_pop   1836   1   3   %oparray_po
p   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringv
al--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1194/1684(ro)(G)--   --dict:2/20(G)--   --dict:82/200(L)--   --dict:33
/50(L)--
Current allocation mode is local
Last OS error: No such file or directory
Current file position is 131017
MiKTeX GPL Ghostscript 9.19: Unrecoverable error, exit code 1

The script does work on the example you provide!

Removes colorbar

Hey. First off, thanks for creating this script. I've been able to use it (mostly) successfully. However it has been struggling with the following eps (in.eps), as the colorbar colors and numbers are gone after running the script on it (out.eps).

test.zip

Also as a side note. When first running your script on this particular eps, I was getting this Inkscape error

** (inkscape.exe:3220): WARNING **: EPS cannot have its bounding box extend beyond its content, so if your drawing is smaller than the page, --export-area-page will clip it to drawing.

Presumably because this eps is actually larger than its page. Modifying line 23 in your code to

ret = subprocess.call('inkscape --export-area-drawing --export-eps=' + tmp+' '+sys.argv[1], shell=True)

fixed it.

Cheers

IndexError: list index out of range

Reported by @hk66 in altmany/export_fig#44

@Sbte Thanks for your code. I wanted to use your python code for an .eps file which has not been generated by matlab(attached here). I have this error:
"Traceback (most recent call last):
File "fix_matlab_eps.py", line 121, in
main()
File "fix_matlab_eps.py", line 56, in main
up_to_m = last[0].split('m')[0]
IndexError: list index out of range"

Could you please check it?
test.eps.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.