/* Plot label on lowest graph only */
if (m == mat.begin())
{
- ps_ctext(ps, xx, yy00 - DDD - psr->X.majorticklen - psr->X.tickfontsize * 0.8,
- xtick[x], eXCenter);
+ ps_ctext(ps, xx, yy00 - DDD - psr->X.majorticklen - psr->X.tickfontsize * 0.8, xtick[x], eXCenter);
}
}
else if (bRmod(m->axis_x[x], psr->X.offset, psr->X.minor)
/* Major ticks */
strlength = std::max(strlength, std::strlen(ytick[y]));
ps_line(ps, xx00, yy, xx00 - psr->Y.majorticklen, yy);
- ps_ctext(ps, xx00 - psr->Y.majorticklen - DDD, yy - psr->Y.tickfontsize / 3.0,
- ytick[y], eXRight);
+ ps_ctext(ps, xx00 - psr->Y.majorticklen - DDD, yy - psr->Y.tickfontsize / 3.0, ytick[y], eXRight);
}
else if (bRmod(m->axis_y[y], psr->Y.offset, psr->Y.minor))
{
if (!mylab.empty())
{
ps_strfont(ps, psr->X.font, psr->X.fontsize);
- ps_ctext(ps, x0 + w / 2,
+ ps_ctext(ps,
+ x0 + w / 2,
y0 - DDD - psr->X.majorticklen - psr->X.tickfontsize * FUDGE - psr->X.fontsize,
- mylab, eXCenter);
+ mylab,
+ eXCenter);
}
}
{
gmx_fatal(FARGS, "Not enough symbols to merge the two colormaps\n");
}
- printf("Combining colormaps of %zu and %zu elements into one of %zu elements\n", map1.size(),
- map2.size(), map.size());
+ printf("Combining colormaps of %zu and %zu elements into one of %zu elements\n",
+ map1.size(),
+ map2.size(),
+ map.size());
gmx::index k = 0;
for (gmx::index j = 0; j < gmx::ssize(map1) && k < gmx::ssize(map); ++j, ++k)
{
if (psr->X.major <= 0)
{
tick_spacing((mat[0].flags & MAT_SPATIAL_X) ? mat[0].nx + 1 : mat[0].nx,
- mat[0].axis_x.data(), psr->X.offset, 'X', &(psr->X.major), &(psr->X.minor));
+ mat[0].axis_x.data(),
+ psr->X.offset,
+ 'X',
+ &(psr->X.major),
+ &(psr->X.minor));
}
if (psr->X.minor <= 0)
{
if (psr->Y.major <= 0)
{
tick_spacing((mat[0].flags & MAT_SPATIAL_Y) ? mat[0].ny + 1 : mat[0].ny,
- mat[0].axis_y.data(), psr->Y.offset, 'Y', &(psr->Y.major), &(psr->Y.minor));
+ mat[0].axis_y.data(),
+ psr->Y.offset,
+ 'Y',
+ &(psr->Y.major),
+ &(psr->Y.minor));
}
if (psr->Y.minor <= 0)
{
{
if (elegend != elBoth)
{
- leg_continuous(&out, x0 + w / 2, w / 2, DDD, legend, psr->legfontsize, psr->legfont,
- leg_map, mapoffset);
+ leg_continuous(
+ &out, x0 + w / 2, w / 2, DDD, legend, psr->legfontsize, psr->legfont, leg_map, mapoffset);
}
else
{
assert(!mat2.empty());
- leg_bicontinuous(&out, x0 + w / 2, w, DDD, mat[0].legend, mat2[0].legend,
- psr->legfontsize, psr->legfont, map1, map2);
+ leg_bicontinuous(
+ &out, x0 + w / 2, w, DDD, mat[0].legend, mat2[0].legend, psr->legfontsize, psr->legfont, map1, map2);
}
}
ps_comment(&out, "Done processing");
"Matrix pruning requires matrices of the same size");
for (gmx::index i = 0; i != gmx::ssize(mat); ++i)
{
- fprintf(stderr, "converting %dx%d matrix to %dx%d\n", mat[i].nx, mat[i].ny,
- (mat[i].nx + skip - 1) / skip, (mat[i].ny + skip - 1) / skip);
+ fprintf(stderr,
+ "converting %dx%d matrix to %dx%d\n",
+ mat[i].nx,
+ mat[i].ny,
+ (mat[i].nx + skip - 1) / skip,
+ (mat[i].ny + skip - 1) / skip);
/* walk through matrix */
int xs = 0;
for (int x = 0; (x < mat[i].nx); x++)
gmx_fatal(FARGS,
"Size of frame %zd in 1st (%dx%d) and 2nd matrix (%dx%d) do"
" not match.\n",
- k, mat1[k].nx, mat1[k].ny, mat2[k].nx, mat2[k].ny);
+ k,
+ mat1[k].nx,
+ mat1[k].ny,
+ mat2[k].nx,
+ mat2[k].ny);
}
printf("Combining two %dx%d matrices\n", mat1[k].nx, mat1[k].ny);
rmat1 = matrix2real(&mat1[k], nullptr);
}
else
{
- write_xpm(out, mat1[k].flags, mat1[k].title, mat1[k].legend, mat1[k].label_x,
- mat1[k].label_y, mat1[k].nx, mat1[k].ny, mat1[k].axis_x.data(),
- mat1[k].axis_y.data(), rmat1, rlo, rhi, white, black, &nlevels);
+ write_xpm(out,
+ mat1[k].flags,
+ mat1[k].title,
+ mat1[k].legend,
+ mat1[k].label_x,
+ mat1[k].label_y,
+ mat1[k].nx,
+ mat1[k].ny,
+ mat1[k].axis_x.data(),
+ mat1[k].axis_y.data(),
+ rmat1,
+ rlo,
+ rhi,
+ white,
+ black,
+ &nlevels);
}
}
gmx_ffclose(out);
gmx_fatal(FARGS,
"WAKE UP!! Size of frame %zd in 2nd matrix file (%dx%d) does not match "
"size of 1st matrix (%dx%d) or the other way around.\n",
- k, mat2[k].nx, mat2[k].ny, mat[k].nx, mat[k].ny);
+ k,
+ mat2[k].nx,
+ mat2[k].ny,
+ mat[k].nx,
+ mat[k].ny);
}
for (int j = 0; (j < mat[k].ny); j++)
{
if (epsfile != nullptr)
{
- ps_mat(epsfile, mat, mat2, bFrame, bDiag, bFirstDiag, bTitle, bTitleOnce, bYonce, elegend,
- size, boxx, boxy, m2p, m2pout, mapoffset);
+ ps_mat(epsfile, mat, mat2, bFrame, bDiag, bFirstDiag, bTitle, bTitleOnce, bYonce, elegend, size, boxx, boxy, m2p, m2pout, mapoffset);
}
if (xpmfile != nullptr)
{
{ efEPS, "-o", nullptr, ffOPTWR }, { efXPM, "-xpm", nullptr, ffOPTWR } };
#define NFILE asize(fnm)
- if (!parse_common_args(&argc, argv, PCA_CAN_VIEW, NFILE, fnm, NPA, pa, asize(desc), desc, 0,
- nullptr, &oenv))
+ if (!parse_common_args(
+ &argc, argv, PCA_CAN_VIEW, NFILE, fnm, NPA, pa, asize(desc), desc, 0, nullptr, &oenv))
{
return 0;
}
fn = opt2fn("-f", NFILE, fnm);
std::vector<t_matrix> mat, mat2;
mat = read_xpm_matrix(fn);
- fprintf(stderr, "There %s %zu matri%s in %s\n", (mat.size() > 1) ? "are" : "is", mat.size(),
- (mat.size() > 1) ? "ces" : "x", fn);
+ fprintf(stderr,
+ "There %s %zu matri%s in %s\n",
+ (mat.size() > 1) ? "are" : "is",
+ mat.size(),
+ (mat.size() > 1) ? "ces" : "x",
+ fn);
fn = opt2fn_null("-f2", NFILE, fnm);
if (fn)
{
mat2 = read_xpm_matrix(fn);
- fprintf(stderr, "There %s %zu matri%s in %s\n", (mat2.size() > 1) ? "are" : "is",
- mat2.size(), (mat2.size() > 1) ? "ces" : "x", fn);
+ fprintf(stderr,
+ "There %s %zu matri%s in %s\n",
+ (mat2.size() > 1) ? "are" : "is",
+ mat2.size(),
+ (mat2.size() > 1) ? "ces" : "x",
+ fn);
if (mat.size() != mat2.size())
{
fprintf(stderr, "Different number of matrices, using the smallest number.\n");
if (ecombine && ecombine != ecHalves)
{
- write_combined_matrix(ecombine, xpmfile, mat, mat2, opt2parg_bSet("-cmin", NPA, pa) ? &cmin : nullptr,
+ write_combined_matrix(ecombine,
+ xpmfile,
+ mat,
+ mat2,
+ opt2parg_bSet("-cmin", NPA, pa) ? &cmin : nullptr,
opt2parg_bSet("-cmax", NPA, pa) ? &cmax : nullptr);
}
else
{
- do_mat(mat, mat2, bFrame, bZeroLine, bDiag, bFirstDiag, bTitle, bTitleOnce, bYonce, elegend,
- size, boxx, boxy, epsfile, xpmfile, opt2fn_null("-di", NFILE, fnm),
- opt2fn_null("-do", NFILE, fnm), skip, mapoffset);
+ do_mat(mat,
+ mat2,
+ bFrame,
+ bZeroLine,
+ bDiag,
+ bFirstDiag,
+ bTitle,
+ bTitleOnce,
+ bYonce,
+ elegend,
+ size,
+ boxx,
+ boxy,
+ epsfile,
+ xpmfile,
+ opt2fn_null("-di", NFILE, fnm),
+ opt2fn_null("-do", NFILE, fnm),
+ skip,
+ mapoffset);
}
view_all(oenv, NFILE, fnm);