I have to say I ran into this before too, when trying to plot a histogram. I think it would be nice to extend it to not simply ignore the x values that would make this work:
load'stats/base' load'plot' data =: ? 1000 $ 0 bins =: (%~>:@i.) 10 'bar' plot bins ([;histogram) data Aside of the fact that it would be more consistent with other plotting commands (the principle of least surprise). xlabel is useful too, but only when using qualitative labels for each bar. Just my 2 cents :). Jan-Pieter 2015-02-08 10:54 GMT+01:00 Björn Helgason <gos...@gmail.com>: > You have more control using the pd commands. > On 8 Feb 2015 02:05, "Ryan" <rec...@bwh.harvard.edu> wrote: > > > I looked at the lab and demo, and they both show the form of > > 'plot x;y', but I guess that only works for regular plot? > > It's weird that the 'bar' variants wouldn't behave the same > > way. I can't figure it out from the source code quite yet, > > so I thought someone could tell me if I'm missing something. > > > > On 8 Feb 2015, at 5:45, Björn Helgason wrote: > > > > > It is a good idea to look at the plot demos and then when you see what > > you > > > want/need then the definition gives you ideas/hints/solutions. > > > On 7 Feb 2015 08:25, "Ryan" <rec...@bwh.harvard.edu> wrote: > > > > > >> Why does the x-axis always start at 1 in bar plots, even > > >> when x data is given? eg. > > >> > > >> 'bar' plot (];*:) i.5 > > >> > > >> generates a bar plot where x=1..5, and not x=0..4 > > >> Same for 'hist', 'sbar', etc. > > >> > > >> thanks for any help, > > >> Ryan > > >> > > >> > > >> The information in this e-mail is intended only for the person to whom > > it > > >> is > > >> addressed. If you believe this e-mail was sent to you in error and the > > >> e-mail > > >> contains patient information, please contact the Partners Compliance > > >> HelpLine at > > >> http://www.partners.org/complianceline . If the e-mail was sent to > you > > in > > >> error > > >> but does not contain patient information, please contact the sender > and > > >> properly > > >> dispose of the e-mail. > > >> > > >> ---------------------------------------------------------------------- > > >> For information about J forums see > http://www.jsoftware.com/forums.htm > > >> > > > ---------------------------------------------------------------------- > > > For information about J forums see http://www.jsoftware.com/forums.htm > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm