PDA

View Full Version : changing font size in pixel map



hcrisp
02-03-2010, 02:46 PM
I am drawing my plots in the Pixel Map output device (in order to save to an image). Everything looks fine, but the font is smaller than it is in a real window. I have tried various calls to DEVICE to make the font larger, but to no avail. Can someone show me the correct way to do it?



SET_PLOT, 'PM'
DEVICE, SET_RESOLUTION=[1280, 1024]
SET_CHARACTER_SIZE=[8, 17]
info, !D, /STR
** Structure !DEVICE, 18 tags, 80 length:
NAME STRING 'PM'
X_SIZE LONG 1280
Y_SIZE LONG 1024
X_VSIZE LONG 1280
Y_VSIZE LONG 1024
X_CH_SIZE LONG 8
Y_CH_SIZE LONG 17
X_PX_CM FLOAT 24.0000
Y_PX_CM FLOAT 18.0000
N_COLORS LONG 256
TABLE_SIZE LONG 256
DISPLAY_DEPTH LONG 8
FILL_DIST LONG 1
WINDOW LONG -1
UNIT LONG 0
FLAGS LONG 1176
ORIGIN LONG Array(2)
ZOOM LONG Array(2)


Do I need to change !D.x_px_cm and !D.y_px_cm? It won't let you do that directly. I am using WAVE 8.0 on XP.

donb
02-03-2010, 09:43 PM
Hi hcrisp,

This seems to work as expected on both 8.0 and the latest release, 9.01:


WAVE> set_plot, 'pm'
WAVE> plot, indgen(10)
WAVE> img=tvrd(0, 0, 640, 512)
WAVE> device, set_char=[40,40]
WAVE> plot, randomu(s,10)
WAVE> img2=tvrd(0, 0, 640, 512)
WAVE> set_plot, 'win32'
WAVE> tv, img
WAVE> tv, img2


If you don't see really big axis characters from the second 'tv' command, let us know.

Don B.

hcrisp
02-04-2010, 12:11 PM
Thank you for verifying that the SET_CHARACTER_SIZE keyword is the proper method for changing the font size. Your example did work for me so I went back and found that the real cause of the error was later code which was changing the font size back before plotting. Problem solved!