python - Matplotlib creates 30 page pdf but individual pages pulled in by latex seem to include most of big pdf -
python - Matplotlib creates 30 page pdf but individual pages pulled in by latex seem to include most of big pdf -
this continuation of question asked on latex forum here appears matplotlib issue. here link http://tex.stackexchange.com/questions/207527/using-includegraphics-makes-pdf-very-large
this matplotlib code created pdf. set file pdf
pp = pdfpages(pdfname)
i phone call next code each time want create new figure on new page
font = {'family' : 'normal','weight' : 'normal','size' : 18} plt.rc('font', **font) fig = plt.figure(figsize=(8.27, 11.69), dpi=100) ax1 = plt.subplot(1,1,1) ax1.set_xlabel(xlabel,fontdict={'fontsize':22}) ax1.set_ylabel(ylabel,fontdict={'fontsize':22}) ax1.set_xlim([xmin,xmax]) ax1.set_ylim([ymin,ymax]) numlines = len(cond1values) titlelabel = '$' + shortname2 + "=" + str(cond2value) + '$' ax1.set_title(titlelabel)
' 2 vectors of info called columnarray[0] , columnarray[1] create x , y axes ' have vector called errcolumnarray[1] containts error bars
type= 'x-' #types[i]
' plot lines error bars
plt.errorbar(columnarray[0],columnarray[1],yerr=errcolumnarray[1], fmt='-', label=linelabel) plt.text(0.5, 0.9,titlelabel, horizontalalignment='center', fontsize=24, bbox={'facecolor':'black', 'alpha':0.02, 'pad':10}, transform = ax1.transaxes) lg = ax1.legend() lg.draw_frame(false) lg.set_frame_on(false) plt.tight_layout() plt.legend(loc='best') plt.draw() pp.savefig(fig) plt.close()
this repeated each of 30 figures create file. @ end call
pp.close()
the problem resulting pages, each graph, cannot pulled latex without pulling in big 30 page pdf.
i have discussed andreas matthias wrote includegraphics library in latex. claims there seem lot of little pdf `objects' in pdf file seem mutual of graphs , causing bloat.
ps upload illustration pdf not know how to.
python pdf matplotlib
Comments
Post a Comment