export_fig failing to pdf 2x2 subplot
- Ngôn ngữ chính
- MATLAB
- Star
- 1.4k
- Fork
- 366
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Hi Altmany - love the script, usually works like a charm. First time it fails me though..
I have a 2x2 subplot, all four of them are somewhat busy (stacked bar plots, lines on top, text annotations, legends, etc). If each of them is a standalone figure, export_fig handles it fine into a pdf. When it's subplot however, I get this ghostscript and/or eps2pdf error [note that if I try exporting to eps it gives me the same error]:
**Ghostscript error: perhaps C:\Users\caballe\AppData\Local\Temp\tpc94c40f4_e46e_4e7b_93f6_22c7fe1fe27c.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\caballe\AppData\Local\Temp\tpc94c40f4_e46e_4e7b_93f6_22c7fe1fe27c.pdf" -dEPSCrop -sFONTPATH="C:\WINDOWS\Fonts" -f "C:\Users\caballe\AppData\Local\Temp\tpcbcea88b_b128_4d8e_b3fc_2aa03f1df970.eps"**
**Error using eps2pdf (line 173)
Error: /rangecheck in --stroke--
Operand stack:
true
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1
%stopped_push 1 3 %oparray_pop 1 3 %oparray_pop --nostringval-- 1 3 %oparray_pop 1 3 %oparray_pop .runexec2 --nostringval--
--nostringval-- --nostringval-- 2 %stopped_push --nostringval--
Dictionary stack:
--dict:1122/1686(ro)(G)-- --dict:0/20(G)-- --dict:115/200(L)--**
**Current allocation mode is local
Current file position is 32402
AFPL Ghostscript 8.14: Unrecoverable error, exit code 1**
**Error in export_fig (line 787)
eps2pdf(tmp_nam, pdf_nam_tmp, 1, options.append, options.colourspace==2, options.quality, options.gs_options);**
In those directories where ghostscript fails there are half rendered pdf files but not with all the information in the figure. Any thoughts/ideas? Thanks!!
For reference, this is the half-rendered PDF:
[tpc94c40f4_e46e_4e7b_93f6_22c7fe1fe27c.pdf](https://github.com/altmany/export_fig/files/3498330/tpc94c40f4_e46e_4e7b_93f6_22c7fe1fe27c.pdf)
**EDIT:** I've boiled down the error to using the `bar `command to plot these histograms. I can get the render to generate a PDF if I use `histogram` for example, but of course stacking is so much easier with bar. Any insight appreciated. For the record, I am using Matlab 2018a on windows 7.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.