[Paraview-developers] XY Chart Plots - changes in ParaView 4.2.0
Panos Asproulis
panos.asproulis at gmail.com
Thu Oct 2 07:40:42 EDT 2014
Hi all,
In ParaView 4.1.0 I use the following code in order to specify some
information regarding the axes in a typical XY line plot (chart):
// Specify the name of the axes
QList<QVariant> axisTitles;
axisTitles << "Error" << "Number of Time Steps" << "";
pqSMAdaptor::setMultipleElementProperty(
viewProxy->GetProperty("AxisTitle"), axisTitles);
// Enable the logarithmic scale for the y-axis
QList<QVariant> logScale;
logScale << 1 << 0 << 0;
pqSMAdaptor::setMultipleElementProperty(
viewProxy->GetProperty("AxisLogScale"), logScale);
Although this works fine in 4.1.0 it no longer works in ParaView 4.2.0
because the properties "AxisTitle" and "AxisLogScale" no longer exist.
They have been replaced by "LeftAxisTitle", "BottomAxisTitle" etc and
"LeftAxisLogScale", "BottomAxisLogScale" etc. So, I changed the above
code to the following:
// Set the name of the left axis
QList<QVariant> leftAxisTitle;
leftAxisTitle << "Error";
pqSMAdaptor::setElementProperty(
viewProxy->GetProperty("LeftAxisTitle"), leftAxisTitle);
// Set the name of the bottom axis
QList<QVariant> bottomAxisTitle;
bottomAxisTitle << "Number of Time Steps";
pqSMAdaptor::setElementProperty(
viewProxy->GetProperty("BottomAxisTitle"), bottomAxisTitle);
// Enable the logarithmic scalefor the left axis
QList<QVariant> onLogScale, offLogScale;
onLogScale << 1;
offLogScale << 0;
pqSMAdaptor::setElementProperty(
viewProxy->GetProperty("LeftAxisLogScale"), onLogScale);
pqSMAdaptor::setElementProperty(
viewProxy->GetProperty("BottomAxisLogScale"), offLogScale);
However, this has no effect. It does not change the title of the axes
and it does not switch on the logarithmic scale for the left axis. Could
someone let me know how to do that in 4.2.0?
Regards,
Panos
More information about the Paraview-developers
mailing list