Skip to content
Discussion options

You must be logged in to vote

Oh, that's an interesting idea!
For that you need to use shapes.

Example

layout:
  shapes:
    - type: rect
      xref: paper # means that x0 and x1 are relative to the screen, not the value of the axis themselves. 
      yref: 'y' # means that y0 and y1 are relative to the first yaxis (if you have multiple yaxes, this can be y2, y3, etc)
      x0: 0 # 0 = start  (see xref)
      x1: 1 # 1 = end (see xref)
      y0: 0 # zero of the actual yaxis
      y1: 50 # in whatever units the axis shows
      fillcolor: green
      opacity: 0.2
      line:
        width: 0
    - type: rect
      xref: paper
      yref: 'y'
      x0: 0
      x1: 1
      y0: 50
      y1: 100
      fillcolor: yellow

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@dbuezas
Comment options

@Qhilm
Comment options

@dbuezas
Comment options

@Qhilm
Comment options

@dbuezas
Comment options

Answer selected by dbuezas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants