From: Igor B. <I....@mu...> - 2005-03-22 05:40:22
|
Hi, I've been using gnuplot for over a decade and contributed error bars for polar plots. One issue that has always annoyed me is that I could not vary the size of the key title box with the "spacing" command. I often have subscripts and superscripts in the key titles which get the box lines go through them. Accordingly, I have been modifying the graphics.c file in the way that is listed below. I had hoped that the latest version of gnuplot would give me the required capacity, but I don't believe it does. If others see value in what I have done perhaps this could be remedied in a future version. An independent determination of the key title height would be ideal. The following uses "spacing". Thanks, Igor -- --------------------------------------------------------------------- Igor Bray, ARC Australian Professorial Fellow, _--_|\ Physics and Energy Studies, / \ School of Engineering Science, *_.--._/ Murdoch University, phone(fax): +61 8 9360 6443(6183) v 90 South Street, Murdoch, mailto:I....@mu... Perth, Western Australia, 6150 http://atom.murdoch.edu.au/ --------------------------------------------------------------------- ~/gnuplot-3.7.1> diff graphics.c graphics.c~ *** graphics.c Tue Feb 5 11:00:51 2002 --- graphics.c~ Wed Sep 15 23:30:29 1999 *************** *** 1050,1054 **** /*{{{ calculate the window in the grid for the key */ - /* Igor Bray modified the code to ensure the key title was the - same height as the key entries. This was done by replacing - "t->v_char" with "key_entry_height" in a number of places */ if (lkey == 1 || (lkey == -1 && key_vpos != TUNDER)) { --- 1050,1051 ---- *************** *** 1057,1060 **** key_w = key_col_wth * key_cols; ! /* key_h = (ktitl_lines) * t->v_char + key_rows * key_entry_height;*/ ! key_h = (ktitl_lines) * key_entry_height + key_rows * key_entry_height; if (lkey == -1) { --- 1054,1056 ---- key_w = key_col_wth * key_cols; ! key_h = (ktitl_lines) * t->v_char + key_rows * key_entry_height; if (lkey == -1) { *************** *** 1750,1752 **** s = ss; ! yl -= key_entry_height/2; /*t->v_char/2; Igor fixing key title height*/ while ((e = (char *) strchr(s, '\n')) != NULL) { --- 1746,1748 ---- s = ss; ! yl -= t->v_char / 2; while ((e = (char *) strchr(s, '\n')) != NULL) { *************** *** 1766,1770 **** s = ++e; ! yl -= key_entry_height; /*t->v_char;Igor fixing key title height*/ } ! yl += key_entry_height/2; /*t->v_char/2;Igor fixing key title height*/ free(ss); --- 1762,1766 ---- s = ++e; ! yl -= t->v_char; } ! yl += t->v_char / 2; free(ss); *************** *** 1783,1788 **** and first entry *//* JFi */ ! /* (*t->move) (key_xl, key_yt - (ktitl_lines) * t->v_char); JFi */ ! /* (*t->vector) (key_xr, key_yt - (ktitl_lines) * t->v_char); JFi */ ! (*t->move) (key_xl,key_yt - (ktitl_lines) * key_entry_height); /* Igor fixing key title height */ ! (*t->vector)(key_xr,key_yt - (ktitl_lines) * key_entry_height); /* Igor fixing key title height */ } --- 1779,1782 ---- and first entry *//* JFi */ ! (*t->move) (key_xl, key_yt - (ktitl_lines) * t->v_char); /* JFi */ ! (*t->vector) (key_xr, key_yt - (ktitl_lines) * t->v_char); /* JFi */ } |