Announcement

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

  • Help with strange changes to made to x-axes when saving a gph to eps

    Hello!
    I used coefplot to make the individual odds ratio graphs and grc1leg2 to combine them and only use one legend. The first graph (Graph2.gph) shows the gph image.
    I need to save this as an eps, and when I go to do so (Graph2.eps), the axes get all wonky- for example see the "0"s on the x axis in Benin, Sierra Leone and Kenya.

    Code used to make the two:
    grc1leg2 BeninReg.gph MaliReg.gph NigeriaReg.gph SierraLeoneReg.gph EthiopiaReg.gph KenyaReg.gph UgandaReg.gph ZambiaReg.gph, legendfrom(ZambiaReg.gph) iscale(*.5) xsize(20) ysize(20) imargin(l=-5 r=-1) saving(Graph2.gph,replace)

    graph export Graph2.eps,replace


    Maybe something about the scaling? But I can't figure out why the two images would not have the same error/issue.

    Any help would be greatly appreciated!
    Graph2.eps

    I can also send the individual graph code or upload pictures of those if helpful.

    Many many thanks in advance.

    Thanks,
    Dana
    Attached Files

  • #2
    Dana Sarnak , did you ever resolve this issue? Assuming the mysterious insertion of the zeros on the x-axes for Benin, Sierra Leone and Kenya were not present on the -gph- file, appearing only on the -eps- file, this looks like an issue with Stata's -graph -export- command. To confirm that theory, you could try a few experiments, such as (a) using -gr combine- instead of -grc1leg2-; (b) exporting as a -png- file instead of as an -eps- file. If the offending zeros appear in experiment (a) but not in (b), the problem would seem to be in -graph export-'s -eps- option. If so, perhaps it has been fixed in a more recent Stata update. What version of Stata and of Stata's -gr export- are you using? (Type "which gr_export" at the Stata prompt.)

    Incidentally, when the x-axes of multiple graphs have very similar ranges, as in your example, the appearance and readability of the combined graphs could be enhanced by the option -xcommon-. Perhaps adding that option would even remove the wayward zeros, though I can't imagine why.

    Comment

    Working...
    X