---
title: "init(x:y:t:domain:function:)"
framework: charts
role: symbol
role_heading: Initializer
path: "charts/lineplot/init(x:y:t:domain:function:)-3mqls"
---

# init(x:y:t:domain:function:)

Creates a mark that graphs a parametric function (x, y) = f(t).

## Declaration

```swift
nonisolated init<S1, S2, S3>(x: S1, y: S2, t: S3, domain: ClosedRange<Double>, function: @escaping @Sendable (Double) -> (x: Double, y: Double)) where S1 : StringProtocol, S2 : StringProtocol, S3 : StringProtocol
```

## Discussion

Discussion Parameters: x: The localized string key for the x label. y: The localized string key for the y label. t: The localized string key for the t label. domain: The domain of t. Must be a finite domain. function: The function to graph. Returns a tuple of (x, y) for a value of t. note: For t values where the function is undefined or is infinity, the function is expected to return Double.nan or Double.infinity respectively.

## See Also

### Plotting parametric functions

- [init(x:y:t:domain:function:)](charts/lineplot/init(x:y:t:domain:function:)-5c4bo.md)
- [init(x:y:t:domain:function:)](charts/lineplot/init(x:y:t:domain:function:)-7bvyi.md)
- [init(x:y:t:domain:function:)](charts/lineplot/init(x:y:t:domain:function:)-610ta.md)
