# FunctionGraphics class

Namespace: [Grasshopper2.UI.Graphing](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.ui.graphing.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public class FunctionGraphics
```

Utility class for drawing function graphs, grip shapes and flourishes.

## Fields

- [GripSize](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/gripsize.md): Gets or sets the base grip radius. Individual grip shapes add a small offset on top of this value (SolidDisc = +2, OpenDisc / SolidDiamond = +3, OpenDiamond = +4, arrows up to +7). Use [FunctionGraphics.MakeCompact()](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/makecompact.md) or [FunctionGraphics.MakeSpacious()](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/makespacious.md) to set both this and [FunctionGraphics.Thickness](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/thickness.md) together.
- [ObscureDashPattern](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/obscuredashpattern.md): Dash pattern applied to graphs of de-emphasised ([Rank.Obscure](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.rank.md)) functions. Set to null or an empty array to draw obscure functions with a solid stroke. The pattern is in pixel units (on, off, on, off, ...).
- [Thickness](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/thickness.md): Gets or sets the base graph curve thickness. 3 is considered normal for the UI, but if you're exporting images or drawing into a small area you may want to adjust it. Use [FunctionGraphics.MakeCompact()](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/makecompact.md) or [FunctionGraphics.MakeSpacious()](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/makespacious.md) to set both this and [FunctionGraphics.GripSize](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/gripsize.md) together.

## Properties

- [Background](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/background.md): Background colour of the surface functions are drawn on. Used to resolve each function's [FunctionUi.Tint](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functionui/tint.md) into a concrete shade with adequate contrast. Defaults to white; set before rendering when drawing onto a differently-coloured surface.
- [Context](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/context.md): Gets the graphics context for these function graphics. Note that the context may use an entirely different set of panning and zooming transforms than the graph view and thus nothing should be drawn using this context without first applying the graph transforms. We recommend only using the draw methods directly exposed by these [FunctionGraphics](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics.md) rather than relying on [Context.Graphics](https://developer.rhino3d.com/api/gh2/type/grasshopper2.eto.drawing.context/graphics.md).
- [Frame](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/frame.md): Gets the visible frame in graphics coordinates.
- [ScalarFont](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/scalarfont.md): (static) Gets the font used to draw scalar text.
- [UnitsPerPixel](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/unitsperpixel.md): Gets the number of graph paper units per pixel.

## Methods

- [DrawAsymptote](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/drawasymptote.md): (3 overloads) Draw a standard vertical asymptote line.
- [DrawBox](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/drawbox.md): (2 overloads) Draw a box around a point.
- [DrawCircle](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/drawcircle.md): (2 overloads) Draw a circle around a point.
- [DrawCross](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/drawcross.md): Draw an x-shaped grip.
- [DrawFlourish](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/drawflourish.md): Draw a grip flourish.
- [DrawGraph](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/drawgraph.md): (2 overloads) Draw a graph polyline.
- [DrawGraphArea](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/drawgrapharea.md): Draw an area graph.
- [DrawGrip](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/drawgrip.md): Draw a grip.
- [DrawHorizontalAxis](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/drawhorizontalaxis.md): Draw a horizontal axis flourish through a point.
- [DrawInfiniteLine](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/drawinfiniteline.md): Draw an infinite line through two points.
- [DrawLine](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/drawline.md): (2 overloads) Draw a finite line segment between points.
- [DrawOpenArrow](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/drawopenarrow.md): Draw an arrow head grip with an edge.
- [DrawOpenDiamond](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/drawopendiamond.md): Draw a diamond grip with an edge.
- [DrawOpenDisc](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/drawopendisc.md): Draw a circular grip with an edge.
- [DrawScalars](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/drawscalars.md): Draw all scalars.
- [DrawSolidArrow](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/drawsolidarrow.md): Draw an arrow head grip.
- [DrawSolidDiamond](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/drawsoliddiamond.md): Draw a diamond grip.
- [DrawSolidDisc](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/drawsoliddisc.md): Draw a circular grip.
- [DrawVerticalAxis](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/drawverticalaxis.md): Draw a vertical axis flourish through a point.
- [FlourishPen](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/flourishpen.md): Gets the edge used to draw flourishes. Called must dispose the edge when finished.
- [MakeCompact](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/makecompact.md): Set [FunctionGraphics.Thickness](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/thickness.md), [FunctionGraphics.GripSize](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/gripsize.md) and [FunctionGraphics.ObscureDashPattern](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/obscuredashpattern.md) to values suitable for small on-canvas drawings where graph area is at a premium.
- [MakeSpacious](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/makespacious.md): Set [FunctionGraphics.Thickness](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/thickness.md), [FunctionGraphics.GripSize](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/gripsize.md) and [FunctionGraphics.ObscureDashPattern](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.graphing.functiongraphics/obscuredashpattern.md) to values suitable for large drawings (the pop-out editor, exported images).
