Quick guide: 19 steps to graphical plotting with EASYPLOT This document and a movie showing these steps is available at www-users.york.ac.uk/~pl568/ EasyPlot is a general purpose graph plotting package which allows you to save, print and analyse your data. Graphs can be exported to other Windows packages by copying the graph to the clipboard. Only basic instructions are provided here. Further assistance can be found using the on-line help or the Easyplot manual. EasyPlot is licensed software and you are not allowed to make copies to transfer to other computers. 1. Open program. 2. Open data from an existing file or click enter data and input your own. 3. Enter data in columns a,b,c,d,e,f,… Easyplot takes column a as x-axis data and the following columns as y-axis data unless you specify them differently. 4. Click ‘plot’ to produce a graph. This must be altered to comply with 2nd year lab standards. 5. Click on ‘tools’ then ‘define data’. This allows you to set the data columns to required definitions. In the box type xyee for Easyplot to plot column a as the x-axis data, column b as the y-axis data, take column c as the error in the x-axis data and column d as the error in the y-axis data. (You can also do this when entering data by clicking on the grey square at the top of each column defining the data as x,y, or e). 6. If at any time you wish to add data click on ‘edit’ then ‘data’. 7. Click ‘style’ then ‘axis setup’ then ‘x-axis’ or ‘y-axis’. Adjust major and minor tic spacing, axis type, and tic size so that the final plot can be easily read by the viewer. E.g. no data points at the utmost edges of the plot and tic spacings in integer steps. 8. On the plot click on the small boxes next to the axes and at the top of the graph. These allow you to write the axes labels and plot heading. Use the text toolbar for Greek symbols, etc. if required. Remember to add units. 9. Click on ‘style’ then ‘font’ to change font and size of axis labels to arial, bold, and size 14. 10. To place the y-axis label horizontally instead of parallel to the y-axis go to ‘file’ then ‘preferences’ then ‘text format’ and click on ‘print y-axis title above y-axis and don’t rotate’. 11. Click on ‘style’ then ‘restyle data’ then untick ‘connect points’ and ‘dashed lines’. 12. Go to plot and right click on any data marker then click on ‘marker prefs’. Change marker size to suitable value. 13. Click on ‘style’ then ‘restyle data’ then click on tick box for x and/or y error bars. Click on ‘pref ’ in error bar box and click on ‘error value’ and ‘half of entire error bar’. N.B. The value of error written in the data column is then half the full distance between opposite ends of the error bar. 14. Click on ‘tools’ then ‘curve fit’ then type in the fitting equation in the box. y = ax +b for straight lines. Click on preferences and ensure that the tick boxes for ‘show uncertainties’, ‘display fit equation on graph’ are highlighted, and then click ‘ok’. (Once Easyplot has found a best-fit, it plots the best-fit curve on the screen and prints the results of the fit as the equation, followed by the r2 value (which is the reduced chi squared value) followed by fitted values of the unknowns and the errors in the fit, given as s subscripted by the unknown value to which it refers. In order for the fit to be classed as a ‘good’ fit, the value of r2 should not be far from 1 since a value of 1 would denote a perfect fit to the data). 15. Click ‘options’ then ‘grid’ to add grid to graph. 16. Click ‘style’ then ‘colors’ then click on the part of the diagram you wish to change and select the colour. This should be white for the plot. Click ‘ok’. 17. To make the markers solid, right click on any data point and click on ‘properties’. Click on ‘mark, dash, and color’ and pick a solid colour point. 18. Click on ‘file’, then ‘preferences’ then ‘tic marks’ and then highlight ‘inside graph’. Click ‘ok’. 19. To save your graph, go to the ‘file’ menu and click ‘save’. The file will be saved in ASCII format which means that it can be viewed with ‘Notepad’ or a similar text viewer. Easyplot saves information such as ‘graph titles, annotations’ etc. as commands which begin with ‘/’ so the ‘style’ options you have added to your graph will also be saved and will automatically appear when the file is next opened in Easyplot. To print your graph, first check that the printed version will look correct on the printout by using ‘print preview’. You can alter the position of legends, annotations etc. by dragging them with the mouse. Then press ‘print’. There are many options available using Easyplot. The rest of the document provides additional information. Opening data from a text file If you have previously saved the data as a text file, you can double-click on the file or type in the filename. You can also add multiple curves to the same graph using these methods. If you would prefer to open up another curve in a new graph, click ‘new’ in the ‘file’ menu. Your data should be saved in ASCII or text format in columns, with spaces or commas between them. Easyplot will ignore any line beginning with a non-numeric character except the character ‘/’ which is reserved for Easyplot commands. Working with multiple curves If more than one curve is displayed on your graph, you can select a particular curve for further manipulation (e.g. transformation, curve fitting, deletion or copying) by clicking on the curve or by holding down the right mouse button and clicking until the correct curve is displayed in the bottom left hand corner of the screen. The curve can then be copied, deleted etc. by choosing the appropriate option. Curve Transformations If you want to transform a particular data set, either select the curve you wish to transform and go to ‘tools’ menu and choose ‘transform’ or go directly to this menu and follow the instructions to choose the curve you wish to manipulate. A ‘transform data’ window appears. Type in the transformation you require: e.g. y=y*30 will multiply all y values by 30. e.g. y=y-(4x+3) will take a straight line of the equation y=4x+3 from the data. e.g. x=log(x) transforms the x data to log(x). Note that this window also allows you to choose whether to keep the original curve and whether to transform only the data visible on the screen. Additional curve fitting information To fit a curve, go to the ‘Tools’ menu and choose ‘Curve fit’. You then may type in the equation to be fitted or choose one of the standard options from the menu. If you enter a number, N from 0 to 9, an Nth order polynominal will be fitted. However this method will generate zero errors in the fit so it should not generally be used unless you do not need to know the errors in your fitted parameters. This method will also ignore any error bars on your data and so the only approved way to fit any data is as detailed in steps 1 to 19. e.g. y=ax+b will fit a straight line, weighted by the error bars in your data and will produce an error in a and b. e.g. y=ax^2+bx+c will fit a quadratic, weighted by the error bars, with errors in a,b,c. e.g. y=alog(bx) will fit a logarithmic function to the data, weighted by error bars, with errors in a and b. If you have typed an equation for the fit, you will then be asked to provide initial guesses for the unknowns. It is generally unnecessary to provide any initial guesses so just press ‘Enter’ after each question. If the fit appears to be homing in on a bad solution, click the mouse button to stop the fit and start again with initial guesses. Example of EasyPlot graphical output for a fit to a straight line data. 2nd Year Lab Standards for graphical representation of data Graphical Representation of Experimental Data It is a well established convention that the independent variable (x) is plotted along the horizontal axis, and the dependent variable (y) along the vertical axis (y against x). We shall concern ourselves primarily with straight line graphs of the form y = mx + c. In your laboratory work you will gain experience of plotting other graphs and taking measurements from them, but the straight line graph will be by far the commonest type. It is the easiest to analyse and therefore often most appropriate to processes data as a plot on a straight line graph. Plotting error bars on your graphs You should clearly mark the errors associated with your data points on the graph, unless they are so small that it is not reasonable to display them. Use a simple bar, horizontal for errors in the independent variable, vertical bars for errors in the dependent variable. Two examples are given in figures 1 and 2. Scales Your choice of scales depends on what the graph is designed to achieve. i) The scale should be simple so that it is easy to take measurements without having to do excessive arithmetic to work out the scale. ii) The experimental points should not all be bunched together in one small region of the graph as in figure 3 unless point iii) below applies. iii) You may have to choose the scale for theoretical reasons. For example, you want to verify a relationship y = mx, in which case you must include the origin on your graph. Fig 3. (a) is not very useful, except if you are verifying a theoretical model of the form y = mx, fig. 3(b), when you need to know if a line passing through the experimental points also passes through the origin. If possible, take more data nearer to the origin.