<div dir="ltr">FYI: Found what is going on with the SetWidth.<div><br></div><div style>The value set by the user in vtkPlotBar::SetWidth (and vtkPlotBar::SetOffset) are overwritten by vtkChartXY::CalculateBarPlots(). I understand that this is the behavior that one would like 90% of the time. But in my case the width and the offset of each bar plot is critical to the visualization. I tried to trick it by setting GetBarWidthFraction to 2.0 but it still affect the offset,</div>
<div style><br></div><div style>The only thing I can see would be to add a flag in vtkChartXY such as SetAutomaticWidthOffsetCalculation(bool) that would be true by default but could be disabled when needed (such as in my case).</div>
<div style><br></div><div style>Regards,<br>Alex</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 2, 2013 at 10:53 PM, Alexandre Boucher <span dir="ltr"><<a href="mailto:afboucher@gmail.com" target="_blank">afboucher@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello all,<div><br></div><div>I am having two problems:</div><div>1) I am unable to control the width of the bar in vtkPlotBar</div>
<div>2) I cannot set the axis to invisible<br><div><br></div><div><br></div>
<div>There is a previous plot in corner 0 that behaves the same way</div><div>------------------</div><div><div> vtkPlotBar* plot = chart_->AddPlot(vtkChart::BAR);</div><div> chart_->SetPlotCorner(plot, 2);</div>
<div> plot->SetWidth( 50 ); // No effect</div><div> plot->SetInputData(table,1,2);</div><div><br></div><div> vtkAxis *x_axis = chart_->GetAxis(vtkAxis::TOP);</div><div> x_axis->SetVisible(false); // No effect<br>
</div><div><br></div><div> vtkAxis *y_axis = chart_->GetAxis(vtkAxis::RIGHT);</div><div> y_axis->SetVisible(false); // No effect<br></div></div></div><div>----------------------</div><div><br></div><div>1) Whatever I put to SetWidth the plot is unchanged Looking at the code this should change the width of the bar since it is passed to the PaintSegments functions.</div>
<div><br></div><div>2) The vtkAxis::SetVisible(false) has not effect</div><div><br></div><div>Anyone has any hints of what I am doing wrong?</div><div><br></div><div>Thanks,</div><div>
Alex</div><div><br></div></div>
</blockquote></div><br></div>