<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><br></div> It cannot be done using the default X windows monitor and -draw_save because there is no way to distinguish the files for each sub window images.<div><br></div><div> However, there is an alternative. </div><div><br></div><div> <span style="font-family: Menlo; font-size: 14px;">-ksp_view_eigenvalues draw:image:jeff.ppm -viewer_view -ksp_monitor_solution draw:image:joe.ppm</span></div><div><font face="Menlo"><span style="font-size: 14px;"><br></span></font></div><div><font face="Menlo"><span style="font-size: 14px;"> </span></font>This alternative only supports .ppm files (so you may need to call a converter on the result) and does put each image in a separate file in its own named directory, for example, joe/joe_0.ppm but at least it allows you to have different named files. Of course you can also just run your code twice with two different options.</div><div><br></div><div> Unfortunately there is a bug in the KSP eigenmonitor viewing that I had to fix to get this to work so you'll need to checkout the <b style="color: rgb(200, 20, 201); font-family: Menlo; font-size: 14px;">barry/2023-02-08/fix-ksp-monitor-eigenvalues-draw </b>branch of PETSc to use the option I suggest.</div><div><br></div><div> Barry</div><div><br></div><div><br></div><div> </div><div><div><br><blockquote type="cite"><div>On Feb 8, 2023, at 5:09 AM, Zongze Yang <yangzongze@gmail.com> wrote:</div><br class="Apple-interchange-newline"><div><div dir="ltr"><div>Hi, PETSc group,</div><div><br></div><div>I was trying to save figures of the residual and eigenvalues with different names but not default names.</div><div><br></div><div>The default name is used when I use `-draw_save .png`. All images are saved.</div><div>```</div><div>python test.py -N 16 -test1_ksp_type gmres -test1_pc_type jacobi -test1_ksp_view_eigenvalues draw -test1_ksp_monitor draw::draw_lg -draw_save .png<br></div><div>```</div><div>But when I use `-draw_save abc.png`, only the figure of eigenvalues is saved.</div><div><div>```</div><div>python test.py -N 16 -test1_ksp_type gmres -test1_pc_type jacobi -test1_ksp_view_eigenvalues draw -test1_ksp_monitor draw::draw_lg -draw_save .png<br></div><div>```</div></div><div><br></div><div> How can I add the command line options, to specify different names for those images?<br></div><div></div><div><br></div><div>Thanks,</div><div>Zongze</div></div>
</div></blockquote></div><br></div></body></html>