Menu

Floating Column Chart

2015-10-09
2016-02-01
  • Thomas Leonard

    Thomas Leonard - 2015-10-09

    Hello all!

    I am looking to make a floating column style chart in Gnuplot, but I'm not having much luck. Here is a brief mock up of what I am trying to achieve:

    This can easily be made with bars that start from y=0 , using newhistogram etc, but I can't seem to find an easy way to plot between two y values. There could be some complex workaround using stack histograms, but it all gets out of hand quick.

    How difficult would this be to implement, either as an option or further plot style? Or is this opening a can of worms?

    Cheers,

    Thomas

    edit:

    Looking in graphics.c, there does seem to be a value for ylow, perhaps this could be changed to be read from another column from the data file?

     

    Last edit: Thomas Leonard 2015-10-09
  • Christoph Bersch

    I think your best option is the boxxyerrorbars plotting style.

     
  • Ethan Merritt

    Ethan Merritt - 2015-10-09

    You can probably get what you want using the existing plot style "with boxxy".

    Here's an example using the data file 'silver.dat' from the demo collection.
    The "boxxy" column usage is:

     x y xlow xhigh ylow yhigh color
    

    The nominal x and y are not relevant to this example, since we will fill the box
    xlow/xhigh/ylow/yhigh. Furthermore we will use the line number in the file as the xlow coordinate (column 0).

      set style fill solid 
      plot 'silver.dat' using 0:2:0:($0+0.5):3:2:0 with boxxy lc variable
    
     
  • Thomas Leonard

    Thomas Leonard - 2015-10-12

    Thanks for the suggestions guys - I had looked at box plots, but would never have thought of box error bars!

    I needed a few workarounds to get the final result I wanted , but I have a number of identical graphs to make so I will definitely get use from the work put in.

    Cheers!

     

    Last edit: Thomas Leonard 2015-10-12
  • Anonymous

    Anonymous - 2016-02-01

    Oh cool, I'm gonna have to get in on this

     

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.