altmany / export_fig

A MATLAB toolbox for exporting publication quality figures
BSD 3-Clause "New" or "Revised" License
1.28k stars 368 forks source link

Where the gs path exists ? #294

Closed syrgsgr closed 4 years ago

syrgsgr commented 4 years ago

Readme has this infomation.

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:

I have selected the folder incorrectly in the dialog box. after that install gs 9.5 and add system's path. but still has this error,

(Ghostscript 8.54 is incorrectly foler)

export_fig(fig2v,'ax2vel.pdf');

GPL Ghostscript 8.54: Can't find initialization file gs_init.ps.

Ghostscript error: perhaps C:\Users\ohlab1\AppData\Local\Temp\tp8e10f28d_43fb_4299_b585_afaa22843e19.pdf is open by another application or maybe you have another gs executable in your system's path Ghostscript options: -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -sOutputFile="C:\Users\ohlab1\AppData\Local\Temp\tp8e10f28d_43fb_4299_b585_afaa22843e19.pdf" -dEPSCrop -sFONTPATH="C:\windows\Fonts" -f "C:\Users\ohlab1\AppData\Local\Temp\tpc2834936_67dd_4862_8599_9352dd0b91c3.eps"

export_fig error. Please ensure: that you are using the latest version of export_fig and that you have Ghostscript installed and that you do not have multiple versions of export_fig installed by mistake and that you did not made a mistake in the expected input arguments

If the problem persists, then please report a new issue.

i want to edit gs's path, but i cant fined gs path

i tried p = strsplit(getenv( 'PATH' ), pathsep); C:\usr\local\bin

altmany commented 4 years ago

The paths are typically stored in txt files in the .ignore sub-folder of the export_fig folder (for example, C:\export_fig\export_fig.ignore\ghostscript.txt and other txt files in that sub-folder). If this .ignore folder does not exist or is non-writable, then the paths are stored in similar txt files in the user preferences folder (prefdir):

winopen(prefdir)