[Mesa-users] [EXT] Pgplot - how to produce pdf plots?

Mathieu Renzo mrenzo at arizona.edu
Fri Aug 23 21:48:05 UTC 2024


Hi Pau,

To add to Rich's answer, from $MESA_DIR/star/defaults/pgstar.defaults it 
appears you can make pgplot output pdf directly. However, this is also 
*incorrect*! Thanks for bringing our attention to this, we will improve 
the documentation on this in future releases.

What is currently that file:

    ! File output
    ! -----------


       ! file_device
       ! ~~~~~~~~~~~
       ! file_extension
       ! ~~~~~~~~~~~~~~

       ! 'png' is Portable Network Graphics format; can also use 'pdf'

       ! ::

     file_device = 'png'
     file_extension = 'png'

This may make one think that  you can achieve what you want just setting 
`file_device` and `file_extension` to pdf. I tested this and it does not 
work.

However, as a workaround, what does  work is to set those two options to 
`ps` (for postscript), or go the way Rich suggested. As he said, ps and 
eps are vector formats too, and should be easy to convert them to pdf 
afterwards.
Cheers,
Mathieu



On 8/23/24 14:02, Pau A.S. via Mesa-users wrote:
> *
>
> *External Email*
>
> *
> ------------------------------------------------------------------------
> Dear all...
>
> I was wondering whether there's a tool to produce a pdf of the last 
> instant of output that pgplot produces on the screen, but of better 
> quality, maybe with python?
>
> Those two plots are very informative and it would be nice to have them 
> on pdf to explain things to students, etc
>
> Thanks!
>
> _______________________________________________
> mesa-users at lists.mesastar.org
> https://lists.mesastar.org/mailman/listinfo/mesa-users
>

-- 
Mathieu Renzo <https://users.flatironinstitute.org/~mrenzo/>
Assistant Professor
University of Arizona & Steward Observatory
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20240823/b271065d/attachment.htm>


More information about the Mesa-users mailing list