Any way to get a figure from Python's matplotlib into Matlab? -
Any way to get a figure from Python's matplotlib into Matlab? -
i'm processing info research project, , i'm writing scripts in python. i've been using matplotlib create graphs nowadays supervisor. however, die-hard matlab user , wants me send him matlab .fig files rather svg images.
i've looked on can't find job. there way either export .fig files matplotlib, convert .svg files .fig, or import .svg files matlab?
thanks in advance help.
without access (or experience matlab) going bit tricky. amro stated, .fig files store underlying data, , not image, , you're going have hard time saving .fig files python. there couple of things might work in favour, these are:
numpy/scipy can read , write matlab .mat files the matplotlib plotting commands very similar to/ based on matlab ones, code generate plots info going identical (modulo round/square brackets , 0/1 based indexing).my approach write info out .mat files, , set plotting commands in script , give supervisor - luck shouldn't hard him recreate plots based on information.
if had access matlab test/debug, i'm sure possible create code automagically created .mat files , matlab .m file recreate figures.
there's neat list of matlab/scipy equivalent commands on scipy web site.
good luck!
python matlab matplotlib
Comments
Post a Comment