bluemira.display.auto_config ============================ .. py:module:: bluemira.display.auto_config .. autoapi-nested-parse:: Automatic configuration some plot defaults Functions --------- .. autoapisummary:: bluemira.display.auto_config.get_primary_screen_size bluemira.display.auto_config._get_primary_screen_size bluemira.display.auto_config.get_figure_scale_factor bluemira.display.auto_config.plot_defaults Module Contents --------------- .. py:function:: get_primary_screen_size(timeout: float = 3) Get the size in pixels of the primary screen. Used for sizing figures to the screen for small screens. :param timeout: timeout value in seconds :type timeout: float :returns: * **width** (*Union[int, None]*) -- width of the primary screen in pixels. If there is no screen returns None * **height** (*Union[int, None]*) -- height of the primary screen in pixels. If there is no screen returns None .. py:function:: _get_primary_screen_size() Direct run of screen size check without subprocess :returns: * *width* -- width of the primary screen in pixels. If there is no screen returns None * *height* -- height of the primary screen in pixels. If there is no screen returns None .. py:function:: get_figure_scale_factor(figsize) Scale figure size to fit on small screens. If the screen fits the figure the scale factor is 1. :param figsize: matplotlib figsize width x height :type figsize: np.array(float, float) :returns: **sf** -- scale factor to fit screen :rtype: float .. py:function:: plot_defaults(*, force=False) Set a series of plotting defaults based on machine and user. If bluemira plots are not to your tastes, do not work with your OS, or don't fit your screen, please create a user profile for yourself/machine here and adjust settings as needed. :param force: force default figsize irrespective of screen size :type force: bool