# How to set width of vtkAxisActor2D?

**URL:** <https://discourse.vtk.org/t/how-to-set-width-of-vtkaxisactor2d/14047>\
**Category:** Development\
**Created:** [June 13, 2024, 9:23pm UTC](https://discourse.vtk.org/t/how-to-set-width-of-vtkaxisactor2d/14047 "2024-06-13T21:23:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Konradlk](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/k/76d3ee/32.png) [@Konradlk](https://discourse.vtk.org/u/Konradlk)\
**Post date:** [June 13, 2024, 9:23pm UTC](https://discourse.vtk.org/t/how-to-set-width-of-vtkaxisactor2d/14047/1 "2024-06-13T21:23:12Z")

</div>

I am using vtkLegendScaleActor as following:

```auto
    scaleActor = vtkSmartPointer<vtkLegendScaleActor>::New();
    scaleActor->RightAxisVisibilityOff();
    scaleActor->LeftAxisVisibilityOff();
    scaleActor->TopAxisVisibilityOff();
    scaleActor->LegendVisibilityOff();
    
    auto bottomAxis = scaleActor->GetBottomAxis();
    bottomAxis->SetWidth(0.3333);

```

I want the bottomAxis to be 1/3rd of the viewport width. Instead of the desired effect the Axis becomes extremely large. Going off of the screen as pictured below.

If I do not set width takes up .75 of the viewport and it looks fine but I need it to be smaller.

 ![image](https://discourse.vtk.org/uploads/default/original/2X/3/352b6cccc642e55f219ea34d4026d9e69b69e9d7.png)
