Last modified: 12 December 2018

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"])