LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
tikzExportPNG.m
1function tikzExportPNG(self, filePath, dpi)
2% TIKZEXPORTPNG Export network diagram to PNG image
3%
4% TIKZEXPORTPNG(FILEPATH) exports the network diagram as a PNG image
5% at 150 DPI resolution.
6%
7% TIKZEXPORTPNG(FILEPATH, DPI) exports at the specified DPI resolution.
8%
9% Requires pdflatex and pdftoppm (from poppler-utils) to be installed.
10%
11% Example:
12% model.tikzExportPNG('network.png')
13% model.tikzExportPNG('network_hires.png', 300)
14%
15% Copyright (c) 2012-2026, Imperial College London
16% All rights reserved.
17
18% Convert MATLAB model to Java Network
19jnetwork = JLINE.line_to_jline(self);
20
21if nargin < 3
22 jnetwork.tikzExportPNG(filePath);
23else
24 jnetwork.tikzExportPNG(filePath, int32(dpi));
25end
26end