Menu

How to plot vertical bar in graph?

Help
2017-01-18
2017-01-19
  • Luciano Magrini

    Luciano Magrini - 2017-01-18

    Dears,

    I need to plot a vertical bar on my chart to highlight a specific region. How to do this using the "patch" command.

    Specifically,

    The vertical bar should start at x = 121 and end at x = 198 and I want this bar to occupy the entire range of the y-axis.

    Can you help me?

    I thank you!

     
  • Bastian Märkisch

    There is no patch command in gnuplot. But you can add objects such as arrows and rectangle,
    see help set arrow, help set object, help set object rectangle, and help coordinates. In your case you might want to start with

     set object 1 rect from 121, graph 0 to 198, graph 1 fc "gray90" fill noborder back
    
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.