Re: Labeling points on ListPlot - Transform string date element in
- To: mathgroup at smc.vnet.net
- Subject: [mg106539] Re: Labeling points on ListPlot - Transform string date element in
- From: dh <dh at metrohm.com>
- Date: Fri, 15 Jan 2010 03:22:43 -0500 (EST)
- References: <himsqo$jdi$1@smc.vnet.net>
Hi, I think you have too many points for labeling. Therefore, tooltips may suit you better. here is an example: ListPlot[Tooltip[Drop[#, 1], #[[1]]] & /@ lunarlibrationdatepoints, AxesLabel -> {subEarthLongitude, subEarthLatitude}] Daniel Canopus56 wrote: > I have a date ordered set of lunar libration points for the coming lunar month, list "lunarlibrationpoints" - a subset of list "lunarlibrationdatepoints" - which is plotted with: > > ListPlot[lunarlibrationpoints, > AxesLabel -> {subEarthLongitude, subEarthLatitude}, Joined -> True ] > > Q1. - How do I label the points on the foregoing plot with label tags like a date or text (e.g. "01-21-2010", "New", "1st Qtr", "Full", "3rd Qtr") > > The list "lunarlibrationdatepoints" can be imported with: > > lunarlibrationdatepoints = Import["Librationdatepoints.csv", "Data"] > > - where the csv file contains date string dates and x-y points in the form: > > 01/15/2010 00:00, 1.88531, -0.05868 > > - which imports the date as a string. > > Q2. How do a transform the date string elements in an array into a new array with the date-times recognized in date format? > > Thanks in advance, Kurt > > Appended: lunarlibrationpoints, lunarlibrationdatepoints > > lunarlibrationpoints = {{1.88531`, -0.05868`}, {1.48071`, -0.48333`}, \ > {0.51372`, -1.46487`}, {-0.89192`, -2.80368`}, {-2.29053`, \ > -4.02242`}, {-3.63769`, -5.07292`}, {-4.88443`, -5.91182`}, \ > {-5.97681`, -6.50049`}, {-6.85651`, -6.80485`}, {-7.46284`, \ > -6.79571`}, {-7.63154`, -6.68184`}, {-7.7365`, -6.45045`}, \ > {-7.62541`, -5.75668`}, {-7.09256`, -4.71852`}, {-6.12555`, \ > -3.36477`}, {-4.74635`, -1.75715`}, {-3.01874`, 0.00579`}, {-1.05013`, > 1.79374`}, {-0.51078`, 2.24904`}, {1.01573`, 3.46133`}, {3.0159`, > 4.87283`}, {4.79227`, 5.92584`}, {6.21539`, 6.56454`}, {7.2008`, > 6.77939`}, {7.71399`, 6.5966`}, {7.76689`, 6.0715`}, {7.76517`, > 6.06435`}, {7.39809`, 5.24102`}, {6.6774`, 4.1876`}, {5.67751`, > 2.96399`}, {4.4741`, 1.62811`}, {3.13841`, > 0.23621`}, {1.73383`, -1.15655`}, {0.31436`, -2.49586`}, \ > {-1.07546`, -3.72878`}, {-1.23675`, -3.86572`}, {-2.39938`, \ > -4.80488`}} > > lunarlibrationdatepoints = {{"01/15/2010 00:00", > 1.88531`, -0.05868`}, {"01/15/2010 07:11", > 1.48071`, -0.48333`}, {"01/16/2010 00:00", > 0.51372`, -1.46487`}, {"01/17/2010 00:00", -0.89192`, -2.80368`}, \ > {"01/18/2010 00:00", -2.29053`, -4.02242`}, {"01/19/2010 00:00", \ > -3.63769`, -5.07292`}, {"01/20/2010 00:00", -4.88443`, -5.91182`}, \ > {"01/21/2010 00:00", -5.97681`, -6.50049`}, {"01/22/2010 00:00", \ > -6.85651`, -6.80485`}, {"01/23/2010 00:00", -7.46284`, -6.79571`}, \ > {"01/23/2010 10:53", -7.63154`, -6.68184`}, {"01/24/2010 00:00", \ > -7.7365`, -6.45045`}, {"01/25/2010 00:00", -7.62541`, -5.75668`}, \ > {"01/26/2010 00:00", -7.09256`, -4.71852`}, {"01/27/2010 00:00", \ > -6.12555`, -3.36477`}, {"01/28/2010 00:00", -4.74635`, -1.75715`}, \ > {"01/29/2010 00:00", -3.01874`, > 0.00579`}, {"01/30/2010 00:00", -1.05013`, > 1.79374`}, {"01/30/2010 06:18", -0.51078`, > 2.24904`}, {"01/31/2010 00:00", 1.01573`, > 3.46133`}, {"02/01/2010 00:00", 3.0159`, > 4.87283`}, {"02/02/2010 00:00", 4.79227`, > 5.92584`}, {"02/03/2010 00:00", 6.21539`, > 6.56454`}, {"02/04/2010 00:00", 7.2008`, > 6.77939`}, {"02/05/2010 00:00", 7.71399`, > 6.5966`}, {"02/05/2010 23:45", 7.76689`, > 6.0715`}, {"02/06/2010 00:00", 7.76517`, > 6.06435`}, {"02/07/2010 00:00", 7.39809`, > 5.24102`}, {"02/08/2010 00:00", 6.6774`, > 4.1876`}, {"02/09/2010 00:00", 5.67751`, > 2.96399`}, {"02/10/2010 00:00", 4.4741`, > 1.62811`}, {"02/11/2010 00:00", 3.13841`, > 0.23621`}, {"02/12/2010 00:00", > 1.73383`, -1.15655`}, {"02/13/2010 00:00", > 0.31436`, -2.49586`}, {"02/14/2010 00:00", -1.07546`, -3.72878`}, \ > {"02/14/2010 02:51", -1.23675`, -3.86572`}, {"02/15/2010 00:00", \ > -2.39938`, -4.80488`}} > > > > >