:: SigmaPlot Interface ::
 > Overview > Sample Plots > Sample Animations > Online Manual > Function Reference > Pricing/Ordering

 SigmaPlot Interface Toolbox for O-Matrix Plot Samples

The The SigmaPlot Interface Toolbox for O-Matrix enables you to create SigmaPlot graphs directly from O-Matrix. This language-based control of SigmaPlot couples the numerical analysis and automation capabilities of O-Matrix with SigmaPlot visualization. The following examples illustrate how commands are entered in O-Matrix to render plots in SigmaPlot. This is a sampling of only a few of the plot types that can be created.

 SigmaPlot Graph Click thumbnail to view complete graph O-Matrix Commands ``` # Create xy plot of single vector x = 0. : .1 : 2*pi splot( sin(x) ) ``` ``` # X vs. multiple Y with style changes x = 0.:.1:2*pi y = [sin(x), cos(x)] splot(x, y, "line", "Dash-dot", 0.04, "red") spxtitle("X") spytitle("sin(x)/cos(x)") sptitle("Sine - Cosine Graph") ``` ``` # Create 3-D trajectory plot y = 0.: .01 : 2 * pi x = sin(4*y) z = cos(4*y) splot(x, y, z) ``` ``` # Create vertical bar chart with errors Y = {2., 2.5, 3.25} YN = [Y, Y*1.5, Y*2, Y*0.8] x = {10, 15, 20} sbar(YN, x, rand(rowdim(YN), coldim(YN))*2) sptitle("Vertical Bar Chart with Errors") spcolumns({"X","Sample", "Sample*1.5", ... "Sample*2.0", "Sample*0.8"}) ``` ``` # Scatter Plot with Error bars & regression fit x = 1:1:10 y1 = {.6,3.2,3.3,3.8,4.7,4.9,4.9,4.9,5.2,5} e1 = {.24,.54,.52,.4,.26,.33,.54,.29,.44,.2} y2 = {1.2,1.6,2.2,2.6,3.1,2.6,2.9,3.1,3,2.6} e2 = {.3,.41,.4,.21,.32,.37,.28,.3,.39,.26} serrorbars(x, [y1,y2], [e1,e2], "regression") sptitle("Error Bars & Regression Fit") spcolumns({"X", "y1", "error1", "y2", "error2"}) ``` ``` # Unevenly Spaced Box Plots x = {1, 2, 4, 8, 15} Y = rand(100, rowdim(x)) * 4 sbox(x,Y) sptitle("Specialized Box Plots") ``` ``` # Creating Histograms r = snormal(128000,1) shist(r, 40); shist(r, 30, true); ``` ``` # Contour Samples x = {[1,2,3], [2,4,7], [3,7,14]} scontour(x) sptitle("Simple Contour") scontour(x, true, true) sptitle("Contour with Labels") ``` ``` # Surface Plot Examples include example\demo\fft2dx.oms ssurface(G) sptitle("G(f1, f2)") ssurface(G, false) sptitle("G(f1, f2) - no lines") ssurface(G, true, "discrete") sptitle("G(f1, f2) - discrete levels") ssurface(G, true, "none") sptitle("G(f1, f2) - no colors") ``` ``` # Pie Charts sales = {10,8,5,12,13,5,13,11,9,7,15,4} spie(sales) sptitle("Widget Sales") ``` ``` # Manipulating data in an existing # SigmaPlot notebook jnbFile = [OM_INSTALL,"\ipacks\SP\examples\Rosenbrock.jnb"] spopen(jnbFile) spitem("OMatrixWorksheet1") R = spget(1, 1, 21, 21) z = fill(1.0, 7, 6) R.blk(5, 5, 7, 6) = z spput(R) spitem("OMatrixGraph1") sptitle("Modified Rosenbrock Function") ``` ``` # Run a SigmaPlot macro on a graph created from O-Matrix include example\demo\fft2dx.oms ssurface(G) sptitle("2-D FFT") spmacro("name", "Insert Graphs into Word") ``` ``` # Creating Ternary Plots dataFile = [OM_INSTALL,"\example\automation\ternaryData.csv"] Nr = nrows(dataFile) tData = read(dataFile, "real", Nr, 3) sternary(tData) ``` ``` # Creating Polar Plots r = 1. : 1. : 100. Theta = 360 * [r, -r] / 100 R = [r, r] spolar(Theta, R) sptitle("spolar(Theta,R)") spolar(Theta, R, "Scatter & Lines") sptitle("spolar(Theta,R) - Scatter & Lines") ```