Activities 2 and 3 were given last August 17, but I was not able to attend class that time since we travelled to Iloilo that day to attend the SPP Conference scheduled August 18-21 (apologies, ma'am). I was only able to start the activities last August 24. Good thing the activities were scheduled for 3 meetings. Since ma'am was not able to attend class, I opted to work on the activities independently in our lab.
Activity 2 of AP 186 is about using ratio and proportion to determine the values of points on a scanned plot, relating the the number of pixels on the image and the values of the variables on the plot.
First thing was to scan a plot, either hand-drawn or plotted using an XY plotter. I am fortunate that our lab has a flatbed scanner (HP Scanjet G2410) that I can use for this activity. I used Dr. Sarmago's PhD dissertation (thank you sir!) as my source of a plot, which is shown below.
Scanned copy of a plot in Dr. Sarmago's PhD dissertation. |
After scanning the plot, the image was opened in MS Paint, and the positions of the tick marks in terms of pixels were noted and recorded, along with the corresponding values of the variables. The values are tabulated in a spreadsheet and are shown below.
Tabulated values of the pixel positions of tick marks and the equivalent pixel distance for both axis tick intervals |
The distance between tick marks in terms of pixels were calculated for each adjacent tick mark, and these values were averaged for each axis. The calculated averages correspond to the distance in pixels equivalent to the intervals of the tick marks. It was calculated that there are 75.2 pixels per 0.3 Nd concentration, and -24.2 pixels per 10 K. Note that these will be measured from the point (0,0) (in terms of the physical variables). The ratio for the x axis is positive because the pixel position increases from left to right. The ratio for the y-axis is negative because the pixel position decreases from bottom to top.
The scanned graph was then reconstructed using the calculated ratios. The pixel positions of the points on the graph were then tabulated (pointer was positioned at the center of the points). The pixel distances from the origin were calculated, and by ratio and proportion (multiply pixel distance along x by 0.3/75.2, and the pixel distance along y by 10/-24.2), the values of the variables were calculated. These values were then plotted using SigmaPlot, also noting to scale the point where the vertical and horizontal axes meet. I opted for SigmaPlot since I cannot figure out in MS Excel how to cross the axes at the calculated point at the same time retaining the tick intervals. This was easy to do in SigmaPlot but somehow I could not do it in MS Excel. The reconstructed plot is shown below.
Reconstructed plot of the scanned graph showing Tc,zero vs Xs |
In SigmaPlot, it is not possible to replace the background of the plot by an image (only solid colors were available). So I overlayed the scanned image and the reconstructed plot using MS Powerpoint, coinciding the lower left corners of the plots (However, I know how to overlay images in an Excel plot, which I will discuss in the latter part for the bonus points :) ). The overlayed images are shown below.
Image of the overlayed scanned and reconstructed plots |
The ticks (especially the left and bottom axes) and the points of both graphs more of less coincide; however, the axes do not. I was able to observe from the calibration part that the axes of the scanned graph were angularly displaced by slightly less than 90 degrees. When I tried going from the lower left corner of the plot and up (keeping the same x pixel), the axis was off towards the right. On the other hand, when I tried going from the lower left corner of the plot and to the right (keeping the same y pixel), the axis was off upwards. This may have contributed to the errors in the interpolation of the points' values and the observable deviations of the tick marks in the right and top axes). Of course we also consider the errors brought about by the finite resolution of the scanned image. With these in mind, maybe I'll give myself a rating of 9.
Overlaying an image on the background of an MS Excel graph
This is quite easy to do (as I've learned from http://www.mrexcel.com/forum/excel-questions/19950-inserting-image-behind-excel-graph.html). This can be done by right clicking on the chart, and click Format Chart Area. Under Fill, there's an option to use a Picture or texture fill. From here, we can choose an image to be used as a background of the chart. We should be careful that the background of the plot are should be transparent or have no fill. A sample overlay is shown below.
Sample overlay of an image on the background of an MS Excel graph |
No comments:
Post a Comment