Differences

This shows you the differences between two versions of the page.

Link to this comparison view

phy123summer:plotting_tool [2010/06/01 17:08] (current)
Line 1: Line 1:
 +====== Plotting Tool ======
 +
 +When you need to use it in the lab this plotting tool will be built in to the materials (possibly with some modifications). I've put it here also in case you just want to try it out (or plot some other data). Your plot will always appear on a new tab. 
 +
 +<​html>​
 +<form method="​post"​ action="​http://​mini.physics.sunysb.edu/​~mdawber/​plot/​basicplot2.php"​ target="​_blank">​
 +x axis label (include units): <input type="​text"​ name="​xaxis"​ size="​60"/><​br>​
 +y axis label (include units): <input type="​text"​ name="​yaxis"​ size="​60"/><​br>​
 +Check this box if the fit should go through (0,​0). ​ <input type="​checkbox"​ name="​zero"​ value="​y"​ /><​br>​
 +(Don't include (0,0) in your list of points below, it will mess up the fit.)<​br>​
 +What kind of errors are you entering below?<​SELECT name="​errortype">​
 +<OPTION value="​none">​None</​OPTION>​
 +<OPTION value="​x">​Errors in x</​OPTION>​
 +<OPTION value="​y">​Errors in y</​OPTION>​
 +<OPTION value="​xy">​Errors in x and y</​OPTION>​
 +</​SELECT>​
 +<br>
 +
 +x1: <input type="​text"​ name="​x1"​ size="​10"/>​+/​-<​input type="​text"​ name="​dx1"​ size="​10"/>&​nbsp;&​nbsp;&​nbsp;​ y1:  <input type="​text"​ name="​y1"​ size="​10"/>​+/​-<​input type="​text"​ name="​dy1"​ size="​10"/><​br/>​
 +x2: <input type="​text"​ name="​x2"​ size="​10"/>​+/​-<​input type="​text"​ name="​dx2"​ size="​10"/>&​nbsp;&​nbsp;&​nbsp;​ y2:  <input type="​text"​ name="​y2"​ size="​10"/>​+/​-<​input type="​text"​ name="​dy2"​ size="​10"/><​br/>​
 +x3: <input type="​text"​ name="​x3"​ size="​10"/>​+/​-<​input type="​text"​ name="​dx3"​ size="​10"/>&​nbsp;&​nbsp;&​nbsp;​ y3:  <input type="​text"​ name="​y3"​ size="​10"/>​+/​-<​input type="​text"​ name="​dy3"​ size="​10"/><​br/>​
 +x4: <input type="​text"​ name="​x4"​ size="​10"/>​+/​-<​input type="​text"​ name="​dx4"​ size="​10"/>&​nbsp;&​nbsp;&​nbsp;​ y4:  <input type="​text"​ name="​y4"​ size="​10"/>​+/​-<​input type="​text"​ name="​dy4"​ size="​10"/><​br/>​
 +x5: <input type="​text"​ name="​x5"​ size="​10"/>​+/​-<​input type="​text"​ name="​dx5"​ size="​10"/>&​nbsp;&​nbsp;&​nbsp;​ y5:  <input type="​text"​ name="​y5"​ size="​10"/>​+/​-<​input type="​text"​ name="​dy5"​ size="​10"/><​br/>​
 +x6: <input type="​text"​ name="​x6"​ size="​10"/>​+/​-<​input type="​text"​ name="​dx6"​ size="​10"/>&​nbsp;&​nbsp;&​nbsp;​ y6:  <input type="​text"​ name="​y6"​ size="​10"/>​+/​-<​input type="​text"​ name="​dy6"​ size="​10"/><​br/>​
 +x7: <input type="​text"​ name="​x7"​ size="​10"/>​+/​-<​input type="​text"​ name="​dx7"​ size="​10"/>&​nbsp;&​nbsp;&​nbsp;​ y7:  <input type="​text"​ name="​y7"​ size="​10"/>​+/​-<​input type="​text"​ name="​dy7"​ size="​10"/><​br/>​
 +x8: <input type="​text"​ name="​x8"​ size="​10"/>​+/​-<​input type="​text"​ name="​dx8"​ size="​10"/>&​nbsp;&​nbsp;&​nbsp;​ y8:  <input type="​text"​ name="​y8"​ size="​10"/>​+/​-<​input type="​text"​ name="​dy8"​ size="​10"/><​br/>​
 +x9: <input type="​text"​ name="​x9"​ size="​10"/>​+/​-<​input type="​text"​ name="​dx9"​ size="​10"/>&​nbsp;&​nbsp;&​nbsp;​ y9:  <input type="​text"​ name="​y9"​ size="​10"/>​+/​-<​input type="​text"​ name="​dy9"​ size="​10"/><​br/>​
 +<input type="​submit"​ value="​submit"​ name="​submit"​ />
 +</​form>​
 +</​html>​
 +
 +===== How it works =====
 +A php script ​ takes the inputs you enter and formats it into instructions which are fed to [[http://​www.gnuplot.info/​|Gnuplot]] to produce your plot. Gnuplot is a **free** and powerful plotting program and can do quite a lot more than we're using it for here. You might like to check it out if you're interested in this kind of thing. Other plotting programs commonly used by physicists include Microcal Origin (powerful but expensive) or Microsoft Excel (not the best, but on just about every computer in the world).
 +
 +===== What's the fit doing? =====
 +When the computer makes a fit it is using a technique called linear regression using a least squares approach. The computer tries to find the line where the sum of the squares of the differences between the line and the data points is the smallest and calls this the line of best fit.
  
phy123summer/plotting_tool.txt ยท Last modified: 2010/06/01 17:08 (external edit)
CC Attribution-Noncommercial-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0