How to actually use export_fig?

246 ビュー (過去 30 日間)
jan mischke
jan mischke 2015 年 11 月 2 日
編集済み: James Richard 2019 年 10 月 20 日
How does the export_fig function work? I always get the hint to use the File Exchange and this function if I want to get high resolution pictures from my plots, but there is not a single word on how to actually use it. So everyone talks about it like you already know everything about it :( I am quite new to matlab. Do I just unzip it and copy all files in my directory of my script and then? Do I need to change something? Can someone help me with this or at least give me a link to a README that explains on how to use such functions? Thank you
  3 件のコメント
Walter Roberson
Walter Roberson 2019 年 2 月 10 日
I find information that the default Windows 10 image viewer is not able to display aa number of different image types but that it is possible to switch back.

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2015 年 11 月 2 日
"Usage examples and tips can be found in the README section at: https://github.com/altmany/export_fig/blob/master/README.md"
To use it, go to the link in the file exchange and click on the Download link. Save the .zip file somewhere. Unzip the .zip into a separate directory in a convenient location. Then go into MATLAB and use the command
pathtool
and add the directory to the MATLAB path.
After that, you call it like any function that can be used in command or function mode.
  5 件のコメント
Walter Roberson
Walter Roberson 2019 年 7 月 25 日
Sounds like you did not use pathtool to add the directory to your MATLAB path.

サインインしてコメントする。

その他の回答 (1 件)

James Richard
James Richard 2019 年 10 月 20 日
編集済み: James Richard 2019 年 10 月 20 日
The organized ways I think is to use the built-in Add-On Explorer itself.
  1. In MATLAB, open Preferences
  2. Navigate to MATLAB>Add-Ons
  3. Choose any directory that you would like it. It's one directory for all add-ons.
  4. Click OK
  5. Now, open Add-On Explorer
  6. Search "export_fig", then open it
  7. Click "Add from GitHub"
  8. It will ask you to sign in first, if you haven't.
  9. Then click OK
Don't forget to install Ghostscript and pdftops (part of the Xpdf command line tools) if you haven't.
And you're done.
Locating Ghostscript/pdftops - You may find a dialogue box appears when using export_fig, asking you to locate either Ghostscript or pdftops (part of the Xpdf package). These are separate applications which export_fig requires to perform certain functions. If such a dialogue appears it is because export_fig can't find the application automatically. This is because you either haven't installed it, or it isn't in the normal place. Make sure you install the applications correctly first. They can be downloaded from the following places:
  1. Ghostscript: www.ghostscript.com
  2. pdftops (install the Xpdf package): www.xpdfreader.com
If you choose to install them in a non-default location then point export_fig to this location using the dialogue box.

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by