Search the Knowledgebase |
Browse by Category |
|
|
|
| How can I plot my data using date/times on my X axis? |
| User Opinions |
|
No users have voted.
|
|
Thank you for rating this answer.
|
Surfer does not support alphanumeric or date/time data. All data to be gridded in Surfer must be numeric. You can work around this by converting your data to Julian dates, plotting the Julian dates, then labeling the axis with the actual date/time data.
Convert your date/time data to Julian dates:
- Open your data file in Excel.
- Select your date/time column and choose to format the cells as Number. That will convert the dates/times to Julian dates. You may want to increase the Decimal places if you have time data in addition to dates. For example, see attached XYZ data.xls.
- Save and close the data file.
- You can now grid this data file in Surfer and create a map from the data. Now your axes will show the Julian date labels.
Label the axes with the actual date/time data:
If you created a non-3D map (contour, image, shaded relief, etc) you can replace these labels with the actual date/times.
- Double click on the bottom axis (or whatever axis shows the Julian dates), and on the General tab uncheck the Show checkbox, and on the Ticks tab set the Major Ticks to None. Click OK.
- Now you can either use the Draw | Text option to draw in the date labels, or you can use the Post map to plot dates along the X axis as data point labels.
- To use a post map, first double click on the contour map (or other map type) and on the General tab click on the little white “i” in the blue circle. In the Grid Information window, note the Y minimum value of the grid file.
- Open the Surfer worksheet, or an Excel worksheet, and create a data file with the X (Julian date/times), Y (minimum Y value of grid file), and label (5/1/05) for all the tick marks and labels you would like to see on the axis. For example, see attached Date Labels.xls.
- Create a post map from this data file using the "+" symbol.
- In the Post Properties dialog, go to the Labels tab and choose to label the points with the data column containing the actual date/time values. Choose to position the labels below the symbol. Click OK.
- Select both maps and go to Map | Overlay Maps.
- Double click on the Bottom Axis again and go to the Scaling tab. Set the Cross Y Axis at value to the Y minimum of the grid file and click OK.
- Double click on the Left Axis, go to the Scaling tab, set the Axis Minimum to the Y minimum of the grid file and click OK. You may also need to modify the First Major Tick value.
- Double click on the Right Axis, go to the Scaling tab, set the Axis Minimum to the Y minimum of the grid file and click OK. You may also need to modify the First Major Tick value.
- If you want to make adjustments to the date labels, double click on the Post Map, go to the Labels tab, and make font adjustments or placement changes here.
For an example of the final output, please see attached Date Time axis.srf.
|
| Visitor Comments |
|
No visitor comments posted. Post a comment
|