Announcement

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

  • increase dpi in figure files

    Dear Stata friends, how to increase dpi in figure files?

    The journal requires 300-600dpi JPEG/Tif figure files.

    I can only produce 96dpi files from -graph export-. My procedure was like this:

    sysuse auto, clear
    hist mpg
    graph export g1.jpg, replace // also tried options width quality
    graph export g2.tif, replace // also tried options width quality

    In File Explore, the Property>Details of the exported files show that
    Horizontal resolution 96dpi
    Vertical resolution 96dpi

    Help please! Thank you in advance for your time.

  • #2
    There is a -quality- option which can take integer from 1 to 100. I am not sure whether it will translate to your desired dpi. Try the following code and see if the dpi has increased.
    Code:
    graph export g1.jpg, quality(100) replace
    Roman

    Comment


    • #3
      Code:
      graph export g2.tif, replace height(2500)
      you can change the height. The resulting figure should have better quality when printing/making a PDF.

      Comment


      • #4
        Thank you, Roman & Tiago. I tried all the options with -graph export-, but none of them affected the horizontal or vertical resolution of the exported graphs. My workaround was to export the graph to an eps file, then open it in Photoshop (which I used a 7-day trial), increase pdi while keeping the file size within the journal's 2MB limit (Photoshop allows to adjust these settings upon opening an eps file). After that, use "Save as a copy", not "Save as", and choosing JPEG. These produced a 300pdi image with a size below 2MB.

        I hope Stata might have something like -graph export, dpi(300)- Cheers!

        Comment

        Working...
        X