# Question about vtkChartXY

**URL:** https://discourse.vtk.org/t/question-about-vtkchartxy/981
**Category:** Support
**Created:** [May 17, 2019, 1:49am UTC](https://discourse.vtk.org/t/question-about-vtkchartxy/981 "2019-05-17T01:49:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Kim\_William](https://discourse.vtk.org/user_avatar/discourse.vtk.org/kim_william/32/373_2.png) [@Kim\_William](https://discourse.vtk.org/u/Kim_William)
#### Post date: [May 17, 2019, 1:49am UTC](https://discourse.vtk.org/t/question-about-vtkchartxy/981/1 "2019-05-17T01:49:33Z")

</div>

Hi all.

I have a question about the properties of the vtkChartXY.

Question1)  
I want to change the color of the axis’s label.

 ![%EA%B7%B8%EB%A6%BC1](https://discourse.vtk.org/uploads/default/original/1X/5b1e065aeed052974b7b0090b948b21b8e4cd437.png)

I think the ① is the ‘label’, and ② is the ‘title’.  
So, I tried to test the code as below:

```
vtkSmartPointer<vtkChartXY> chart =
	vtkSmartPointer<vtkChartXY>::New();

vtkAxis* axis = chart->GetAxis(vtkAxis::LEFT);
axis->GetPen()->SetColor(255, 255, 255, 255);
axis->SetTicksVisible(false);
axis->GetLabelProperties()->SetColor(255, 0, 0);
axis->GetTitleProperties()->SetColor(255, 0, 0);

```

But there is nothing the change.

Question2)  
How to change the size of the points?  
I tried to the code as below:

```
vtkPlot *points = chart->AddPlot(vtkChart::POINTS);
points->SetInputData(table, 0, 1);
points->SetColor(0, 255, 0, 255);
points->SetWidth(0.1);
points = chart->AddPlot(vtkChart::POINTS);
points->SetInputData(table, 0, 2);
points->SetColor(255, 0, 0, 255);
points->SetWidth(0.1);

```

But it also nothing change.

Could you please advise for me?

Thank you 🙂

---

<div class="post-metadata">

### Author: ![lorensen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lorensen/32/20_2.png) [@lorensen](https://discourse.vtk.org/u/lorensen)
#### Post date: [May 17, 2019, 6:57am UTC](https://discourse.vtk.org/t/question-about-vtkchartxy/981/2 "2019-05-17T06:57:38Z")

</div>

Maybe this will help  
[https://lorensen.github.io/VTKExamples/site/Cxx/Plotting/BarChart/](https://lorensen.github.io/VTKExamples/site/Cxx/Plotting/BarChart/)

The axis labels are changed.

---

<div class="post-metadata">

### Author: ![Kim\_William](https://discourse.vtk.org/user_avatar/discourse.vtk.org/kim_william/32/373_2.png) [@Kim\_William](https://discourse.vtk.org/u/Kim_William)
#### Post date: [May 17, 2019, 7:35am UTC](https://discourse.vtk.org/t/question-about-vtkchartxy/981/3 "2019-05-17T07:35:19Z")

</div>

Hi Bill!

Thank you!

I can change the axis labels!

And, do you know the value of minimum vtkPlot width size?  
I have tested the vtkPlot’s ‘SetWidth’ API with changing the value.  
I think the value below 0.5 looks the same.

Thank you 🙂
