// This macro creates a plot that has both vertical and horizontal error bars requires("1.49d"); xValues = newArray(0.1, 0.25, 0.35, 0.5, 0.61,0.7,0.85,0.89,0.95); yValues = newArray(2,5.6,7.4,9,9.4,8.7,6.3,4.5,1); yErrorBars = newArray(0.8,0.6,0.5,0.4,0.3,0.5,0.6,0.7,0.8); xErrorBars = newArray(0.05,0.05,0.04,0.03,0.06,0.06,0.03,0.04,0.05); Plot.create("Error Bars", "X", "Y"); Plot.setLimits(0, 1, 0, 10); Plot.setLineWidth(2); Plot.setColor("lightGray"); Plot.add("line", xValues, yValues); Plot.setColor("red"); Plot.add("circles", xValues, yValues); Plot.setColor("black"); Plot.setLineWidth(1); Plot.add("yerrors", yErrorBars); Plot.add("xerrors", xErrorBars); Plot.show();