---
title: "scaleBy(x:y:)"
framework: coregraphics
role: symbol
role_heading: Instance Method
path: "coregraphics/cgcontext/scaleby(x:y:)"
---

# scaleBy(x:y:)

Changes the scale of the user coordinate system in a context.

## Declaration

```swift
func scaleBy(x sx: CGFloat, y sy: CGFloat)
```

## Parameters

- `sx`: The factor by which to scale the x-axis of the coordinate space of the specified context.
- `sy`: The factor by which to scale the y-axis of the coordinate space of the specified context.

## See Also

### Working with the Current Transformation Matrix

- [ctm](coregraphics/cgcontext/ctm.md)
- [rotate(by:)](coregraphics/cgcontext/rotate(by:).md)
- [translateBy(x:y:)](coregraphics/cgcontext/translateby(x:y:).md)
- [concatenate(_:)](coregraphics/cgcontext/concatenate(_:).md)
