Hi All,
I have one question that How to combine separate month and year columns into one column in igor and make the igor read as MM/YEAR?
Thank you very much.
Yi
First execute this to read about how Igor represents date/time values:
DisplayHelpTopic "Date/Time Waves"
Now here is an example that illustrates how to do what you asked about:
// Make some waves representing year and monthMake/O/N=(3*4) year = 2000 + trunc(p/4)Make/O/N=(3*4) month = mod(3*p+1,12)Edit year, month
// Make a wave to hold date/time dataMake/O/N=(3*4)/D dt // Wave must be double-precision
dt = date2secs(year, month, 1)// Create date/time values from the year and monthSetScale d, 0, 0, "dat", dt // Tell Igor it is a date/time waveAppendToTable dt
// Make a graph using the dt wave for the X axisMake/O/N=(3*4) someData = pDisplay someData vs dt
// Set the date format of the X axis. I generated this command using the// Date Format popup menu in the Ticks&Grids tab of the Modify Axis dialog.ModifyGraph dateInfo(bottom)={0,0,-1},dateFormat(bottom)={Default,2,2,1,2,"Month/Year",16}// Set the bottom axis labelLabel bottom "\\u#2Date"// \\u suppresses Igor's default units mechanism
DisplayHelpTopic "Date/Time Waves"
Now here is an example that illustrates how to do what you asked about:
February 10, 2014 at 08:10 pm - Permalink