# Xpm2ps output error with gromacs 2021

**URL:** <https://gromacs.bioexcel.eu/t/xpm2ps-output-error-with-gromacs-2021/3223>\
**Category:** User discussions\
**Tags:** analysis-tools\
**Created:** [November 29, 2021, 3:22pm UTC](https://gromacs.bioexcel.eu/t/xpm2ps-output-error-with-gromacs-2021/3223 "2021-11-29T15:22:57Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![nevjernik](https://avatars.discourse-cdn.com/v4/letter/n/e47c2d/32.png) [@nevjernik](https://gromacs.bioexcel.eu/u/nevjernik)\
**Post date:** [November 29, 2021, 3:22pm UTC](https://gromacs.bioexcel.eu/t/xpm2ps-output-error-with-gromacs-2021/3223/1 "2021-11-29T15:22:57Z")

</div>

GROMACS version: 2021  
GROMACS modification: No  
With gromacs version 2021 xpm2ps makes a mess on x-axis of output .eps file (see attached file)  
I tried many combinations of .m2p options, but could not find numbers which gives correct output file.  
With gromacs version 2019 everything works fine.

I used this command:  
`gmx xpm2ps -f ss.xpm -o output.eps -di ps.m2p -by 8`  
with file attached

 ![xpm2ps_error](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/8/8cae0569dd73aa1af39d1f3fd33434ba324f756b.png)

I found that similar behavior previously was characterised as a (solved) bug, but seems it is still here, or I miss something?

ps.m2p:

> black&white = no ; Obsolete  
> titlefont = Times-Roman ; A PostScript Font  
> titlefontsize = 20 ; Font size (pt)  
> legend = yes ; Show the legend  
> legendfont = Times-Roman ; A PostScript Font  
> legendlabel = ; Used when there is none in the .xpm  
> legend2label = ; Used when merging two xpm’s  
> legendfontsize = 20 ; Font size (pt)  
> xbox = 0.2 ; x-size of a matrix element  
> ybox = 2.0 ; y-size of a matrix element  
> matrixspacing = 2.0 ; Space between 2 matrices  
> xoffset = 0.0 ; Between matrix and bounding box  
> yoffset = 0.0 ; Between matrix and bounding box  
> ;— Axis options; x-axis —  
> x-major = 200 ; Major ticks on x axis every … frames  
> x-minor = 100 ; Id. Minor ticks  
> x-firstmajor = 0 ; First frame for major tick  
> x-majorat0 = yes ; Major tick at first frame  
> x-majorticklen = 10.0 ; x-majorticklength  
> x-minorticklen = 5.0 ; x-minorticklength  
> x-label = ; Used when there is none in the .xpm  
> x-fontsize = 16 ; Font size (pt)  
> x-font = Times-Roman ; A PostScript Font  
> x-tickfontsize = 10 ; Font size (pt)  
> x-tickfont = Helvetica ; A PostScript Font  
> ;— Axis options; y-axis —  
> y-major = 10  
> y-minor = 4  
> y-firstmajor = 0  
> y-majorat0 = no  
> y-majorticklen = 8.0  
> y-minorticklen = 4.0  
> y-label =  
> y-fontsize = 16  
> y-font = Times-Roman  
> y-tickfontsize = 10  
> y-tickfont = Helvetica

---

<div class="post-metadata">

**Author:** ![ebriand](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/ebriand/32/2314_2.png) [@ebriand](https://gromacs.bioexcel.eu/u/ebriand)\
**Post date:** [November 30, 2021, 8:17am UTC](https://gromacs.bioexcel.eu/t/xpm2ps-output-error-with-gromacs-2021/3223/2 "2021-11-30T08:17:10Z")

</div>

Can you upload the xpm file? Would be easier to look into it with a full example

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [December 1, 2021, 11:15am UTC](https://gromacs.bioexcel.eu/t/xpm2ps-output-error-with-gromacs-2021/3223/3 "2021-12-01T11:15:41Z")

</div>

> [@nevjernik](#):
>
> x-major = 200 ; Major ticks on x axis every … frames  
> x-minor = 100 ; Id. Minor ticks

Increase these values and you won’t get so many tick marks. If you have a very long trajectory, it may be more appropriate to have ticks every few tens of ns rather than every 1-2 ns.

---

<div class="post-metadata">

**Author:** ![scinikhil](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/scinikhil/32/3483_2.png) [@scinikhil](https://gromacs.bioexcel.eu/u/scinikhil)\
**Post date:** [December 1, 2021, 11:32am UTC](https://gromacs.bioexcel.eu/t/xpm2ps-output-error-with-gromacs-2021/3223/4 "2021-12-01T11:32:08Z")

</div>

I have encountered this issue. When i tried with previous versions it was fine. Even at below cases  
x-major = 10 ; Major ticks on x axis every … frames  
x-minor = 0 ; Id. Minor ticks

---

<div class="post-metadata">

**Author:** ![nevjernik](https://avatars.discourse-cdn.com/v4/letter/n/e47c2d/32.png) [@nevjernik](https://gromacs.bioexcel.eu/u/nevjernik)\
**Post date:** [December 4, 2021, 10:04am UTC](https://gromacs.bioexcel.eu/t/xpm2ps-output-error-with-gromacs-2021/3223/5 "2021-12-04T10:04:28Z")

</div>

Thanks, I thought it is of no relevance, but here it is:

> **[ss.xpm](https://drive.google.com/file/d/1WyoLga9sfJmWH5XJBUtF1tZbiFSO37Xo/view?usp=sharing)**
>
> Google Drive file.

Also, here is dssp command used:

```auto
gmx do_dssp -f trajectory.xtc -s md.tpr -sc scount.xvg -o ss.xpm -tu ns -dt 0.1

```

Trajectory is 500ns long.

---

<div class="post-metadata">

**Author:** ![nevjernik](https://avatars.discourse-cdn.com/v4/letter/n/e47c2d/32.png) [@nevjernik](https://gromacs.bioexcel.eu/u/nevjernik)\
**Post date:** [December 4, 2021, 10:08am UTC](https://gromacs.bioexcel.eu/t/xpm2ps-output-error-with-gromacs-2021/3223/6 "2021-12-04T10:08:19Z")

</div>

Thanks Justin  
but unfortunately I already tried many combinations of numbers, tried to find the logic, but it just doesnt make a sense in 2021 version (everything worked fine with 2019).

Trajectory is not large, just 500ns.

ps. sorry for delayed answer, I was really busy with other things

---

<div class="post-metadata">

**Author:** ![ebriand](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/ebriand/32/2314_2.png) [@ebriand](https://gromacs.bioexcel.eu/u/ebriand)\
**Post date:** [December 14, 2021, 8:47am UTC](https://gromacs.bioexcel.eu/t/xpm2ps-output-error-with-gromacs-2021/3223/7 "2021-12-14T08:47:05Z")

</div>

Looked into it, I can reproduce the x-axis bug with 2021 base version, however it was fixed in a subsequent release.

With 2021.4, as well as current dev version, I get the expected result with regards to x-axis tick marks:

 ![output2021_4](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/5/5b0e5a32a54dc27b365398f0a2591b1ec6e6ed0d.jpeg)

In any case, thanks for having taken the time to do such bug report!

---

<div class="post-metadata">

**Author:** ![nevjernik](https://avatars.discourse-cdn.com/v4/letter/n/e47c2d/32.png) [@nevjernik](https://gromacs.bioexcel.eu/u/nevjernik)\
**Post date:** [January 10, 2022, 7:24pm UTC](https://gromacs.bioexcel.eu/t/xpm2ps-output-error-with-gromacs-2021/3223/8 "2022-01-10T19:24:39Z")

</div>

Thank you so much…

(No facebook emoticons here, I really need them now to show appreciation for your support :) )
