Re: Non numerical x-axis in (Date)ListPlot?
- To: mathgroup at smc.vnet.net
- Subject: [mg79006] Re: Non numerical x-axis in (Date)ListPlot?
- From: oshaughn <oshaughn at northwestern.edu>
- Date: Sun, 15 Jul 2007 01:12:58 -0400 (EDT)
- References: <f79s2b$54b$1@smc.vnet.net>
Just reset the ticks variable with the labels being needed. For example (using artificial data) dat = Map[ {"a" <> ToString[#], #} &, Range[3]] ListPlot[Column[dat, 2], Ticks -> {({Range[Length[dat]], Column[dat, 1]} // Transpose), Automatic}] For your data set, just swap 'dat' above for dat1. Note that the first label may not always appear due to the conventional plotrange. On Jul 14, 1:56 am, "Maarten van der Burgt" <maarten.vanderbu... at icos.be> wrote: > Dear all, > > I have two sets of data: > > dat1 = {{"A1",2},{"A2",3},{"A4",1}} > dat2 = {{"A1",2.2},{"A2",2.9},{"A3",0.5},{"A4",1.1}} > > Is there a simple way I can plot these with the {"A1", "A2", "A3", "A4"} as > equidistant tick marks/labels along the horizontal axis and a standard > numerical vertical axis? > Note the missing "A3" in dat1. > > I could not find anything in the options of ListPlot, or in the new (6.0) > DateListPlot. > > Thanks for your help, > > Maarten van der Burgt > Leuven, Belgium