Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • graph export to png - font depends on the state of set graphics

    When I set graphics on , create a graph, and export it to png, the font appears to be the same as the font used in the graph window:


    Code:
    set scheme stcolor
    
    sysuse auto, clear
    
    set graphics on
    
    twoway scatter price mpg
    
    graph export graphics_on.png, replace
    Click image for larger version

Name:	graphics_on.png
Views:	1
Size:	74.5 KB
ID:	1768078

    When I set graphics off, create the same graph, and export it to png, the font changes:

    Code:
    set scheme stcolor
    
    sysuse auto, clear
    
    set graphics off
    
    twoway scatter price mpg
    
    graph export graphics_off.png, replace
    Click image for larger version

Name:	graphics_off.png
Views:	1
Size:	86.7 KB
ID:	1768077

    Why?

    Windows 11
    StataNow/MP 18.5 for Windows (64-bit x86-64)
    Revision 13 Nov 2024

    As best I can remember, I have not changed anything in graph set from the defaults

    Code:
    . graph set window
    
       window           current
       setting          default           choices
       ------------------------------------------------------------------------
       fontface         Arial             font name
       fontfacesans     Arial             font name
       fontfaceserif    Times New Roman   font name
       fontfacemono     Courier New       font name
       fontfacesymbol   Symbol            font name
       ------------------------------------------------------------------------
       To change setting, type "graph set window setting choice"

  • #2
    I get the same font, but the quality appears lower in off mode.

    Comment

    Working...
    X