Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to define where x axis intercepts y axis

  1. Aug 17, 2011 #1
    I want to plot a bar plot using matlab.
    For example:

    x = [0.4 0.5 0.7 0.2 0.1 0.8]
    bar(x)
    ylim([0 1])

    now I want the x axis to intercept the y axis at 0.5 so that any bars >0.5 lie above the x axis and any bars <0.5 are below.

    Is this possible?
    Thanks.
     
  2. jcsd
  3. Aug 18, 2011 #2

    MATLABdude

    User Avatar
    Science Advisor

    I'd look into overlaying a horizontal line on top of your bar graph:
    http://www.mathworks.com/help/techdoc/creating_plots/f10-19972.html#f10-22444 [Broken]
     
    Last edited by a moderator: May 5, 2017
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: How to define where x axis intercepts y axis
  1. X-Axis is wrong (Replies: 0)

Loading...