Skip to content

Custom plotting rcParams to override plot design #3984

@pablogila

Description

@pablogila

Is your feature request related to a problem? Please describe.

Figures usually require some tweaking prior to publication. In order to facilitate this, custom Matplotlib rcParams could be used in the plots.

Describe the solution you'd like

A textbox under File -> Preferences... -> Plotting Settings could allow users to enter a custom rcParams dictionary that would be used for plotting, such as:

'figure.figsize': (3.54, 3.54*0.75),
'figure.dpi': 300,
'axes.linewidth': 0.5,
'lines.linewidth': 1,
'xtick.labelsize': 7,
'ytick.labelsize': 7,
# ... etc

which can then be implemented with something like

plt.rcParams.update(custom_rcParams)

This would also allow users to just copy their existing rcParams and reuse them in SasView.

Describe alternatives you've considered

An actual list of the available rcParams that allows to modify the values. However this is way more demanding and still requires technical understanding.

Also considered modifying the SVG figures, but this is a manual process and the slightest change requires to start all over again.

Additional context

This would facilitate overriding plotting parameters by the users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementFeature requests and/or general improvements

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions