# How to ScaleToDataRange in python?

**URL:** https://discourse.paraview.org/t/how-to-scaletodatarange-in-python/9374
**Category:** ParaView Support
**Tags:** python
**Created:** [April 6, 2022, 1:48pm UTC](https://discourse.paraview.org/t/how-to-scaletodatarange-in-python/9374 "2022-04-06T13:48:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jaeg1710](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/j/a4c791/32.png) [@jaeg1710](https://discourse.paraview.org/u/jaeg1710)
#### Post date: [April 6, 2022, 1:48pm UTC](https://discourse.paraview.org/t/how-to-scaletodatarange-in-python/9374/1 "2022-04-06T13:48:43Z")

</div>

Hello,

is there a way to automatically scale to range with python code? I couldnt find the function.

my current try is:

```auto
data = myModel.GetPointDataInformation()
array = data.GetArray(myArray)
dataRange = array.GetRange()
dataRangeMin = dataRange[0]
dataRangeMax = dataRange[1]

```
