[Paraview-developers] XY Chart Plots - changes in ParaView 4.2.0

Dan Lipsa dan.lipsa at kitware.com
Thu Oct 2 11:06:38 EDT 2014


Hi Panos,

I believe leftAxisTitle, bottomAxisTitle are not QList<QVariant> but just
QVariant.
The same is true for onLogScale, offLogScale.

Does this work?
Dan





> ---------- Forwarded message ----------
> From: Panos Asproulis <panos.asproulis at gmail.com>
> Date: Thu, Oct 2, 2014 at 7:40 AM
> Subject: [Paraview-developers] XY Chart Plots - changes in ParaView 4.2.0
> To: paraview-developers at paraview.org
>
>
> 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
>
> _______________________________________________
> Paraview-developers mailing list
> Paraview-developers at paraview.org
> http://public.kitware.com/mailman/listinfo/paraview-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20141002/df236289/attachment-0001.html>


More information about the Paraview-developers mailing list