Skip to content

Feat: vector graphics in the calibration report

Mikhail Karnevskiy requested to merge feat/vector_graphics into master

@haufs @ahmedk

By default calibration reports contain figures in png format. Current update suggests to use vector graphics figures for reports.

This is implemented by changing a figure format of the inline backend of the notebook to svg. svg format can not be directly included into latex. Therefore svg files are converted to pdf using script svg2pdf from svglib3. This conversion has some complication.

First in case of plotting the large heatmap svg files could be up to 100Mb (for heatmap 1000*1000) and conversion to pdf may take a few minutes. In order to prevent this, only small svg files are converted to pdf. Big files are converted to png, which is much quicker.

Second problem is related to conversion itself. I have seen a bug related to clipping of edges of histograms in case of some plotting options. Seems it works fine with simplePlot and heatmapPlot of the pyDelLib.

There is an option to use pdf format for backend or even both pdf and png. Figures in both folmats will appear in corresponding folder. However in this case produced rst file does not contain figures at all.

Option to have vector graphics can be enabled with command-line argument --vector-figs.

Edited by Mikhail Karnevskiy

Merge request reports