Skip to content

Add Feature for Plotting Scalar Values in XYPlot

Added feature for plotting scalars from repeating subsections

Closes #1333 (closed)

The following yaml:

definitions:
  name: My Plot Test
  sections:
    MySection:
      base_section: nomad.datamodel.data.ArchiveSection
      quantities:
        x_value:
          type: int
        y_value:
          type: int
        y2_value:
          type: int
    MyTopSection:
      base_section: nomad.datamodel.data.EntryData
      m_annotations:
        plot:
        - label: My values
          x: my_sections/:/x_value
          y:
            - my_sections/:/y_value
            - my_sections/:/y2_value
      sub_sections:
        my_sections:
          section: MySection
          repeats: True


data:
  m_def: MyTopSection
  my_sections:
    - x_value: 1
      y_value: -1
      y2_value: -5
    - x_value: 2
      y_value: -2
      y2_value: -4
    - x_value: 3
      y_value: -3
      y2_value: -3
    - x_value: 4
      y_value: -4
      y2_value: -2
    - x_value: 5
      y_value: -5
      y2_value: -1

No gives the following plot:

image

Merge request reports