[vtkusers] vtkBarChartActor

Amitesh Kumar amiteshagarwal at gmail.com
Thu Jun 2 10:49:47 EDT 2011


I am facing a clot of issues in using vtkBarChartActor  to make it render as
I want it to do. I wonder if anybody here would help me with these issues
and answer my questions?

vtkBarChartActor *actor = vtkBarChartActor::New();

1.  I wanted to set the property of the labels on the x-axis for the bars to
be rendered vertical.  I used

actor->GetLabelTextProperty()->SetOrientation(90);

However no matter what I do, the labels would always be rendered
 horizontal. What am I missing?

2. I want to sent the Title text font size to be of a specific size. It
turns out that the font size is set automatically and is based on the number
of characters in the Title. If the number of characters in the title is
less, then the font size would be bigger and vice versa.

actor->GetTitleTextProperty()->SetFontSize(30);

I was trying to use this but it doesn't work or doesn't show any effect.
What am I missing?

3.  I can set the YTitle but is there a ways to set XTitle as well?

4. Y title is always rendered horizontally. Anybody who uses plots, knows
that this is probably not ideal and a better way would be to rotate the
y-axis title by 90 degrees so that it is along  y axis. How can this be
done?

5. Y-axis labels are always being show as floats (values.00). My values are
all int and I want it to be rendered as such. How can this be done?. I
used vtkIntArray as shown in the following but it had no effect in terms of
how y-labels are rendered.

vtkIntArray *qData = vtkIntArray::New();
qData->SetNumberOfValues(nPartition);
for(int i = 0; i <nPartition; i++)
    qData->SetValue(i,output[i]);
vtkDataObject *dobj = vtkDataObject::New();
dobj->GetFieldData()->AddArray(qData);
vtkBarChartActor *actor = vtkBarChartActor::New();
actor->SetInput(dobj);

6. vtkBarChartActor doesn't show X and Y-axes by default. Is there a way to
switch it on?

7. Although vtkCharts is probably good step but it lacks so many
capabilities when compared with, say, gnuplot. Are there any plans to
include a vtk porting of gnuplot which would be something similar to what
was done with Sandia's Verdict?

Thank You

Amitesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110602/31575422/attachment.htm>


More information about the vtkusers mailing list