It can have children of type Trace and Legend.
Graph is a rectangular area with axes, gridlines, tick marks, labels, etc. The optional arguments determine the number of Graphs and their locations. The method Figure.Initialize assigns Graph classes to Figure. A Figure can have multiple children of type Graph. it can be added to a project simply by dragging it to a window. The class hierarchy is as follows: Figure 2: Class Hierarchy. The Classes The currently consist of 5 classes. Figure 1: Getting Started User s Guide vĦ 3.
#Xojo getfolderitem code
Add these lines to your project to plot the data generated by the code above: Figure1.Initialize ' initialize the figure with one graph call Figure1.Graph(0).Plot(x,y) Figure1.Redraw This will result in the following plot. dim x() as Double dim y() as Double for i as integer = 0 to 100 x.append i/10 y.append 1 + sin(i/10) next In the simplest case, plotting data only requires three lines of code. Note that X and Y data values must be in double arrays, and that the dimensions must match. Use the following code to generate some data to be plotted. Then, drag the "Figure" class, which is a subclass of Canvas, into Window1.
Introduction The implement an easy way to plot 2D data, similar to the plot and stem functions in MATLAB Getting Started Create a new project and drag the DataPlotClasses folder into your project. 5 Figure 2: Class Hierarchy Figure 3: Classes Overview Figure 4: The Box area of a Graph Figure 5: Graph Title Figure 6: Axis Labels Figure 7: Axis Scale Types Figure 8: Example Figure 9: Example Figure 10: Example List of Tables Table 1: Style Arguments Table 2: Line Styles Table 3: Marker Styles Table 4: Legend Locations User s Guide v 1.4.2ĥ Introduction 1. 4 List of Tables Introduction Getting Started The Classes Figure Properties BackGoundColor EnableMouseEvents FrameColor GraphCount Graphs AntiAlias Methods DeselectAll DrawToGraphics Graph IndexOfGraph Initialize Redraw Events AutoScale BoxClick FigureClick GraphClick MouseDownBox MouseDownFigure MouseDownGraph MouseDownTrace MouseOverBox MouseOverGraph User s Guide vĢ MouseOverTrace TraceClick Graph Properties AxisLabelSize Box BoxColor BoxFrame BoxFrameColor BoxSelected GraphSelected Grid GridColor Legend Limits MinorGrid MinorGridColor MinX, MaxX, MinY, MaxY SelectColor ShowLegend TextColor TextFont TextLabelCount TextLabels TickLabelSize Title TitleSize TraceCount Traces XLabel, YLabel XScaleType, YScaleType XMinorTick, YMinorTick XTick, YTick XTickLabel, YTickLabel XTickLabelFormat, YTickLabelFormat Methods AddTextLabel AutoFit, AutoFitX, AutoFitY AutoTick, AutoTickX, AutoTickY Initialize IndexOfTrace Plot Pixel2ValueX, Pixel2ValueY StemPlot SetLimits TextLabel User s Guide v 1.4.2ģ Table of Contents Trace Value2PixelX, Value2PixelY Trace Properties DisplayName LineColor LineStyle LineWidth MarkerSolid MarkerStyle MarkerSize Selected Stem x, y Visible TextLabel Properties Text TextColor TextFont TextSize HorizontalAlignment VeticalAlignment Visible x, y Legend Properties BoxColor BoxFrameColor Location TextColor TextSize Visible Examples Example Example Example User s Guide vĤ List of Figures Figure 1: Getting Started. 1 User s Guide v Roger Meier, February 2019 Table of Contents.