Monday, May 22, 2006

string justification in the PS driver

Fiddled around with a hack to GRLEN to deal with the difference in character widths of for PS and PGPLOT symbols. The width ratio varies between different characters so had to give separate numbers for different categories. I only included the most common cases (a-z, A-Z, ".", "(", ")", " ", "-") but that should be close enough for most use.

The proper way to do string justification would be encode it in the PS file (using stringwidth and some tricky manipulation) however to do this the FJUST variable would have to be passed down to the GRTEXT routine and I didn't want to change the signatures of standard PGPLOT calls.

Keywords: HEAsoft, PGPLOT

No comments: