Commit 2bc87913 authored by David Schnur's avatar David Schnur

Cleanup of errorbars plugin and example.

Linked the errorbars example to the examples index page, and cleaned up
both the example and documentation at the top of the plugin.
parent d1a49460
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Flot Examples</title>
<link href="layout.css" rel="stylesheet" type="text/css">
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../excanvas.min.js"></script><![endif]-->
<script language="javascript" type="text/javascript" src="../jquery.js"></script> <script language="javascript" type="text/javascript" src="../jquery.js"></script>
<script language="javascript" type="text/javascript" src="../jquery.flot.js"></script> <script language="javascript" type="text/javascript" src="../jquery.flot.js"></script>
<script language="javascript" type="text/javascript" src="../jquery.flot.errorbars.js"></script> <script language="javascript" type="text/javascript" src="../jquery.flot.errorbars.js"></script>
<script language="javascript" type="text/javascript" src="../jquery.flot.navigate.js"></script> <script language="javascript" type="text/javascript" src="../jquery.flot.navigate.js"></script>
</head> </head>
<body> <body>
<div style="float:left; width:700px; height:500px;" id="flotplot"></div>
<h1>Flot Examples</h1>
<div id="placeholder" style="width:600px;height:400px;"></div>
<p>With the errorbars plugin you can plot error bars to show standard deviation and other useful statistical properties.</p>
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">
$(function () { $(function () {
...@@ -77,9 +86,9 @@ $(function () { ...@@ -77,9 +86,9 @@ $(function () {
zoom: {interactive: true}, pan: {interactive: true} zoom: {interactive: true}, pan: {interactive: true}
}; };
$.plot($("#flotplot"), data , options); $.plot($("#placeholder"), data , options);
}); });
</script> </script>
</body> </body>
</html> </html>
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
<li><a href="percentiles.html">Using filled areas to plot percentiles</a> (with fillbetween plugin)</li> <li><a href="percentiles.html">Using filled areas to plot percentiles</a> (with fillbetween plugin)</li>
<li><a href="tracking.html">Tracking curves with crosshair</a> (with crosshair plugin)</li> <li><a href="tracking.html">Tracking curves with crosshair</a> (with crosshair plugin)</li>
<li><a href="image.html">Plotting prerendered images</a> (with image plugin)</li> <li><a href="image.html">Plotting prerendered images</a> (with image plugin)</li>
<li><a href="errorbars.html">Plotting error bars</a> (with errorbars plugin)</li>
<li><a href="pie.html">Pie charts</a> (with pie plugin)</li> <li><a href="pie.html">Pie charts</a> (with pie plugin)</li>
</ul> </ul>
</body> </body>
......
/* /*
Flot plugin for error-bars Flot plugin for plotting error bars, i.e. to show standard deviation
and other statistical properties in a plot.
* Created by Rui Pereira - rui (dot) pereira (at) gmail (dot) com
This plugin allows you to plot error-bars over points. Set "errorbars"
inside the points series to the axis name over which there will be
error values in your data array (*even* if you do not intend to plot
them later, by setting "show: null" on xerr/yerr).
Options for the plugin are
series: { series: {
points: { points: {
...@@ -14,11 +24,6 @@ Flot plugin for error-bars ...@@ -14,11 +24,6 @@ Flot plugin for error-bars
} }
} }
This plugin allows you to plot error-bars over points. Set "errorbars"
inside the points series to the axis name over which there will be
error values in your data array (*even* if you do not intend to plot
them later, by setting "show: null" on xerr/yerr).
Each data point array is expected to be of the type Each data point array is expected to be of the type
"x" [x,y,xerr] "x" [x,y,xerr]
...@@ -51,8 +56,6 @@ the interconnecting points (with radius: 0), and still showing end ...@@ -51,8 +56,6 @@ the interconnecting points (with radius: 0), and still showing end
caps on the error-bars. shadowSize and lineWidth are derived as well caps on the error-bars. shadowSize and lineWidth are derived as well
from the points series. from the points series.
Rui Pereira
rui (dot) pereira (at) gmail (dot) com
*/ */
(function ($) { (function ($) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment