Chandra X-Ray Observatory
Skip to the navigation links
Last modified: 8 February 2018

How can I change the size of axis labels in a plot?

The size of axis labels in an existing plot can be changed with the ChIPS commands set_xaxis and set_yaxis (or set_axis for both axes), as shown in the following example:

sherpa> plot_data()

sherpa> set_plot_ylabel("counts s^{-1} keV^{-1}")   

sherpa> set_yaxis(["label.size", 18])

sherpa> set_xaxis(["label.size", 18])                   

Note that these commands may be used to change other attributes of plot labels, such as color, line thickness, tickformat style, font, among many others. See the ChIPS set_axis help page for the full list of customizable axis attributes.

Last modified: 8 February 2018
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: Smithsonian Institution, Copyright © 1998-2017. All rights reserved.