From 58088c10467fa5f640f72f8a250f8ed8234be325 Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Thu, 8 Sep 2016 12:18:40 -0400 Subject: when plot with matlab set figure to be invisible, this make proper crop --- matlab_eps.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/matlab_eps.mk b/matlab_eps.mk index d3d7ae8..7ffbcf5 100644 --- a/matlab_eps.mk +++ b/matlab_eps.mk @@ -4,6 +4,7 @@ CLEAN_TARGETS += clean_matlab_eps_targets REAL_CLEAN_TARGETS += real_clean_matlab_eps_targets MATLAB ?= matlab -nodesktop -nojvm -nosplash +MATLAB_INITIATE_FIGURE = "h=figure('visible', 'off');" MATLAB_EPS_PRINT_strt = print('-depsc', MATLAB_EPS_PRINT_stop = ); MATLAB_quit = quit @@ -18,7 +19,8 @@ copy_matlab_pdf_targets: dest_dir_matlab $(matlab_pdf_targets) $(matlab_eps_targets): %.eps : plot_%.m tmp=`mktemp`; \ - cat $< > $${tmp}; \ + echo $(MATLAB_INITIATE_FIGURE) > $${tmp}; \ + cat $< >> $${tmp}; \ echo "$(MATLAB_EPS_PRINT_strt)'$@'$(MATLAB_EPS_PRINT_stop)" >> $${tmp}; \ echo "$(MATLAB_quit)" >> $${tmp}; \ cat $${tmp} | $(MATLAB); \ -- cgit v1.2.3