Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
Last modified: 14 December 2016

How do I use the same font for all the labels in a plot?


Whilst the *.font syntax can be used to change all the font attributes of an axis in one go, it does not allow you to change the font used by all the labels in a plot. To do this, the set_cascading_property command must be used:

chips> set_cascading_property(chips_plot, "font", "times")

will change all labels (including axis labels and ticklabels) to use the Times font. If you have multiple plots then you can use one of the following, depending on whether you have multiple frames or not:

chips> set_cascading_property(chips_frame, "font", "times")
chips> set_cascading_property(chips_window, "font", "times")

This technique can be used for a limited number of attributes, as described in the command's ahelp page.

If you want to change just those labels created by the add_label command, then you can use the "all" id in a set_label call:

chips> set_label("all", ["font", "times", "size", 24, "fontstyle", "bold"])


Last modified: 14 December 2016
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email:   cxchelp@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2017. All rights reserved.