xpm文件是矩陣格式诽表,刪除上方的注釋后起趾,可以用Irfanview打開诗舰,But沒有注釋Label,沒有xy軸label训裆,而且顏色也不好(黑白眶根,而且感覺不到80level)蜀铲,需要采用gromacs xpm2ps轉(zhuǎn)換成eps文件查看。
EPS免費(fèi)軟件:EPS Viewer
注意:xpm2ps關(guān)于設(shè)置矩陣在畫布上的位置和離畫布邊距離有bug属百,一般無法把標(biāo)題和標(biāo)注顯示全记劝,不要在參數(shù)文件調(diào),直接在別的畫圖軟件手動(dòng)拼接W迦拧厌丑!
首先录豺,需要提供一個(gè)參數(shù)文件 -di ?rmsdpara.m2p
然后 用xpm2ps命令將xpm文件轉(zhuǎn)化為eps文件
gmx_mpi xpm2ps -f rmsd.xpm -di rmsdpara.m2p -o rmsd.eps -rainbow blue
一個(gè)矩陣的m2p文件(rmsd.xpm):
linewidth = 6?
titlefont? ? ? ? ? ? ? ? = Arial //標(biāo)題字符類型
titlefontsize? ? ? ? ? ? = 80?//標(biāo)題字符大小
legend? ? ? ? ? ? ? ? ? = yes //顯示legend
legendfont? ? ? ? ? ? ? = Arial //legend字符類型朦肘,used when there is none in the .xpm
legendlabel? ? ? ? ? ? ? = RMSD (nm) //legend 名字,
legend2label? ? ? ? ? ? = //when merging two xpm's
legendfontsize? ? ? ? ? = 66 ?//legend字符大小
xbox? ? ? ? ? ? ? ? ? ? = 10 //x-size of a matrix element 該值的大小影響畫布的大小巩检,得到的像素*像素的值改變厚骗,當(dāng)xbox和ybox設(shè)置的值一樣時(shí)示启,矩陣正方形兢哭,不一樣時(shí),是長方形
ybox? ? ? ? ? ? ? ? ? ? = 10
matrixspacing? ? ? ? ? ? = 20 ?//Space between 2 matrices
xoffset? ? ? ? ? ? ? ? ? = 300 ?//Between matrix and bounding box控制矩陣左邊離box邊的距離夫嗓,同時(shí)改變x size迟螺,例如本來是2600*3400,當(dāng)設(shè)置xoffset為300,則變成了2300*3400舍咖,左邊離畫布邊的留白變小300矩父,但是右邊離畫布邊沒有任何變化!真是bug排霉!但是可以通過左邊留白窍株,把標(biāo)題放左邊
yoffset? ? ? ? ? ? ? ? ? = 300 //控制矩陣下面離box邊的距離
boxlinewidth? ? ? ? ? ? = 20 //box邊框的寬度
ticklinewidth? ? ? ? ? ? = 8 //標(biāo)度tick的寬度
zerolinewidth? ? ? ? ? ? = 0?
x-lineat0value? ? ? ? ? = none //?Draw line at matrix value==0
x-major? ? ? ? ? ? ? ? ? = 20?//x軸大分隔符間距為20,根據(jù)自己的數(shù)值設(shè)定
x-minor? ? ? ? ? ? ? ? ? = 10 //x軸小分隔符間距為20攻柠,一般設(shè)置為major的一半
x-firstmajor? ? ? ? ? ? = 0 ?//Offset for major tick 調(diào)節(jié)第一個(gè)標(biāo)度從?開始
x-majorat0? ? ? ? ? ? ? = no ?//?Additional Major tick at first frame
x-majorticklen? ? ? ? ? = 30 //大標(biāo)度tick的長度
x-minorticklen? ? ? ? ? = 25 //小標(biāo)度tick的長度
x-label? ? ? ? ? ? ? ? ? = Time (ns) ?//x軸標(biāo)題
x-fontsize? ? ? ? ? ? ? = 66 //x軸標(biāo)題字體大小
x-font? ? ? ? ? ? ? ? ? = Arial //x軸標(biāo)題字體類型 (Time (ns))
x-tickfontsize? ? ? ? ? = 60 //x軸標(biāo)度數(shù)字大小(0,20,40...) 我發(fā)現(xiàn)設(shè)置為60時(shí)大小剛好球订,但是!右側(cè)的最后一個(gè)數(shù)值顯示不全瑰钮,如上圖所示冒滩,200被截?cái)?了,只顯示20浪谴,怎么調(diào)畫布都不行开睡,是個(gè)bug因苹!自己畫圖時(shí)需要自己手動(dòng)補(bǔ)全
x-tickfont? ? ? ? ? ? ? = Arial ??//x軸標(biāo)度數(shù)字類型
y-lineat0value? ? ? ? ? = none
y-major? ? ? ? ? ? ? ? ? = 20?
y-minor? ? ? ? ? ? ? ? ? = 10
y-firstmajor? ? ? ? ? ? = 0
y-majorat0? ? ? ? ? ? ? = no
y-majorticklen? ? ? ? ? = 30
y-minorticklen ? ? ? ? ?= 25
y-label? ? ? ? ? ? ? ? ? = Time (ns)
y-fontsize? ? ? ? ? ? ? = 66
y-font? ? ? ? ? ? ? ? ? = Arial
y-tickfontsize? ? ? ? ? = 60
black&white? ? ? ? ? ? ? = no
y-tickfont? ? ? ? ? ? ? = Arial
gmx xpm2ps [-f [<.xpm>]] [-f2 [<.xpm>]] [-di [<.m2p>]] [-do [<.m2p>]]
? ? ? ? ? [-o [<.eps>]] [-xpm [<.xpm>]] [-[no]w] [-[no]frame]
? ? ? ? ? [-title <enum>] [-[no]yonce] [-legend <enum>] [-diag <enum>]
? ? ? ? ? [-size <real>] [-bx <real>] [-by <real>] [-rainbow <enum>]
? ? ? ? ? [-gradient <vector>] [-skip <int>] [-[no]zeroline]
? ? ? ? ? [-legoffset <int>] [-combine <enum>] [-cmin <real>] [-cmax <real>]
DESCRIPTION
gmx xpm2ps makes a beautiful color plot of an XPixelMap file. Labels and axis can be displayed, when they are supplied in the correct matrix format. Matrix data may be generated by programs such as gmx do_dssp, gmx rms or gmx mdmat.
When no .m2p file is supplied, many settings are taken from command line options. The most important option is -size, which sets the size of the whole matrix in postscript units. This option can be overridden with the -bx and -by options (and the corresponding parameters in the .m2p file), which set the size of a single matrix element.
With -f2 a second matrix file can be supplied. Both matrix files will be read simultaneously and the upper left half of the first one (-f) is plotted together with the lower right half of the second one (-f2). The diagonal will contain values from the matrix file selected with -diag.?
Plotting of the diagonal values can be suppressed altogether by setting -diag to none. In this case, a new color map will be generated with a red gradient for negative numbers and a blue for positive.對(duì)角線值默認(rèn)顯示的是左上矩陣,可以通過-diag變?yōu)橛蚁戮仃嚒?/p>
?If the color coding and legend labels of both matrices are identical, only one legend will be displayed, else two separate legends are displayed.?
OPTIONS
Options to specify input files:
-f? ? ? [<.xpm>]? ? ? ? ? (root.xpm)
? ? ? ? ? X PixMap compatible matrix file
-f2? ? [<.xpm>]? ? ? ? ? (root2.xpm)? ? ? (Opt.) //第二個(gè)矩陣
? ? ? ? ? X PixMap compatible matrix file
-di? ? [<.m2p>]? ? ? ? ? (ps.m2p)? ? ? ? (Opt., Lib.) //參數(shù)文件
? ? ? ? ? Input file for mat2ps
Parameters are set in the .m2p file optionally supplied with -di. Reasonable defaults are provided. Settings for the y-axis default to those for the x-axis. Font names have a defaulting hierarchy: titlefont -> legendfont; titlefont -> (xfont -> yfont -> ytickfont) -> xtickfont, e.g. setting titlefont sets all fonts, setting xfont sets yfont, ytickfont and xtickfont.
Options to specify output files:
-do? ? [<.m2p>]? ? ? ? ? (out.m2p)? ? ? ? (Opt.)
? ? ? ? ? Input file for mat2ps
-o? ? ? [<.eps>]? ? ? ? ? (plot.eps)? ? ? (Opt.)
? ? ? ? ? Encapsulated PostScript (tm) file
-xpm? ? [<.xpm>]? ? ? ? ? (root.xpm)? ? ? (Opt.) //可以輸出一個(gè)彩色的或merge的新矩陣
? ? ? ? ? X PixMap compatible matrix file
Merged?or?rainbowed matrices?can be written to an XPixelMap file with the -xpm option.
Other options:
-[no]w? ? ? ? ? ? ? ? ? ? (no)
? ? ? ? ? View output .xvg, .xpm, .eps and .pdb files
-[no]frame? ? ? ? ? ? ? ? (yes)
? ? ? ? ? Display frame, ticks, labels, title and legend
-title? <enum>? ? ? ? ? ? (top) //更改標(biāo)題顯示的位置篇恒,嘗試過更改為ylabel扶檐,還是不顯示,矩陣離邊框的距離設(shè)置太bug
? ? ? ? ? Show title at: top, once, ylabel, none
-title can be set to none to suppress the title, or to ylabel to show the title in the Y-label position (alongside the y-axis).
-[no]yonce? ? ? ? ? ? ? ? (no)
? ? ? ? ? Show y-label only once
-legend <enum>? ? ? ? ? ? (both)
? ? ? ? ? Show legend: both, first, second, none
-diag? <enum>? ? ? ? ? ? (first) //對(duì)角線數(shù)值默認(rèn)來自第一個(gè)
? ? ? ? ? Diagonal: first, second, none
-size? <real>? ? ? ? ? ? (400)?
? ? ? ? ? Horizontal size of the matrix in ps units
-bx? ? <real>? ? ? ? ? ? (0)?
? ? ? ? ? Element x-size, overrides -size (also y-size when -by is not set)
-by? ? <real>? ? ? ? ? ? (0)
? ? ? ? ? Element y-size
-rainbow <enum>? ? ? ? ? ? (no)
? ? ? ? ? Rainbow colors, convert white to: no, blue, red
With the -rainbow option, dull grayscale matrices can be turned into attractive color pictures.
-gradient <vector>? ? ? ? (0 0 0)
? ? ? ? ? Re-scale colormap to a smooth gradient from white {1,1,1} to
? ? ? ? ? {r,g,b}
-skip? <int>? ? ? ? ? ? ? (1)
? ? ? ? ? only write out every nr-th row and column
-[no]zeroline? ? ? ? ? ? ? (no)?
? ? ? ? ? insert line in .xpm matrix where axis label is zero
-legoffset <int>? ? ? ? ? (0)
? ? ? ? ? Skip first N colors from .xpm file for the legend
-combine <enum>? ? ? ? ? ? (halves) //當(dāng)xpm中有兩個(gè)矩陣的時(shí)候婚度,結(jié)合模式默認(rèn)為一半一半
? ? ? ? ? Combine two matrices: halves, add, sub, mult, div
With -combine, an alternative operation can be selected to combine the matrices. The output range is automatically set to the actual range of the combined matrix. This can be overridden with -cmin and -cmax.
-cmin? <real>? ? ? ? ? ? (0)
? ? ? ? ? Minimum for combination output
-cmax? <real>? ? ? ? ? ? (0)
? ? ? ? ? Maximum for combination output