Introduction to Fraunhofer Corporate Design Plots

This repository provides functions for quickly transforming Plotly and Matplotlib plots to adhere to the Fraunhofer Corporate Design.

Getting Started

To install the repository, run:

pip install git+ssh://git@gitlab.cc-asp.fraunhofer.de/chr20768/fhg_cd_plots.git

If you do not have access rights, please contact Christian Wolff.

How to Use

Matplotlib

Import the module: Start by importing fhgcd_plots.main into your script.

Set the template: Use set_matplotlib_style(style, colors) to set the desired style and color.

Possible styles:

  • grid

  • darkgrid

  • greengrid

  • scientific

    Possible color options:

  • official

  • colorful

  • rainbow

Plotly

In plotly graph objects first the figure needs to be generated and afterwards the function “fig.update_layout(template = fhgCD.get_plotly_template(style, color_cycle))” needs to be run. In plotly express the template needs to be specified when creating the plot with “px.scatter(df, template=fhgCD.get_plotly_template(“scientific”, “colorful”))”..

Possible styles:

  • grid

  • darkgrid

  • greengrid

  • scientific

    Possible color options:

  • official

  • colorful

Using Colors Directly

To use the colors directly, import them from the fhgcd_plots.ISEcolors module.

Authors

  • Christian Wolff: Plotly templates, examples, repository maintenance.

  • Paul Gebhardt: Matplotlib templates, examples.