Forum Discussion

fpennisi17's avatar
fpennisi17
Helper III
5 years ago
Solved

Reference lines with slope in scatter plot

Hi,

it is somehow possible to add one or more reference lines with a slope (not parallel to X or Y axis) to a scatter plot, similar to the image below?

 

I would like to understand, at glance, how many points of the scatter fall in a sector.

  • One solution is to find a .PNG image online of a perfect 45 degree line with a white background.  Then, use this image as your plot area background with an "Fit" image style.  Not a perfect solution, but this displays a line with a slope equal to 1.  Example:

     

4 Replies

  • fpennisi17 check the analytics pane and I think that is where you can add lines.

     

    Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

    • fpennisi17's avatar
      fpennisi17
      Helper III

      This is not the case.

      The only available options I have are:

      - Tendency line, which represents a linear interpolation

      - Reference parallel to X axis

      - Reference parallel to Y axis

      - Symmetric shadowing, which provides only two areas and I cannot control the slope

       

      This is why I was asking...

  • fpennisi17 unfortunately, if it is not in the analytical pane then there is no way to add lines (afaik).

     

     

  • One solution is to find a .PNG image online of a perfect 45 degree line with a white background.  Then, use this image as your plot area background with an "Fit" image style.  Not a perfect solution, but this displays a line with a slope equal to 1.  Example: