summaryrefslogtreecommitdiff
path: root/matlab_eps.mk
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2016-09-08 12:18:40 -0400
committerEugeniy Mikhailov <evgmik@gmail.com>2016-09-08 12:18:40 -0400
commit58088c10467fa5f640f72f8a250f8ed8234be325 (patch)
treedbb77cd55ccd49fe568366629809f0d9e9d367d2 /matlab_eps.mk
parentb509b6e10548a7607491556633774d0aa48179e7 (diff)
downloadmakefile_templates-58088c10467fa5f640f72f8a250f8ed8234be325.tar.gz
makefile_templates-58088c10467fa5f640f72f8a250f8ed8234be325.zip
when plot with matlab set figure to be invisible, this make proper crop
Diffstat (limited to 'matlab_eps.mk')
-rw-r--r--matlab_eps.mk4
1 files changed, 3 insertions, 1 deletions
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); \