[Paraview-developers] [Paraviewweb] Setting number of bins in InfoViz Diagrams

Scott Wittenburg scott.wittenburg at kitware.com
Fri Jun 2 14:41:53 EDT 2017


Hi Mike,

   More responses inlined below, but I think this conversation might be
better suited to the paravieweb issue tracker on github?  Just my $0.02.

https://github.com/Kitware/paraviewweb

On Fri, Jun 2, 2017 at 12:15 PM, An, Michael K. <
MKAn at securemissionsolutions.com> wrote:

> Hi Sebastien, and others,
>
> I have a couple questions regarding the customization of the number of
> histogram bins for InfoViz Diagrams.
>
> 1) How do you set the number of bins dynamically, after you have
> instantiated a diagram, e.g., HistogramSelector? The following doesn’t
> work for me:
>
> const histSelectorObj = HistogramSelector.newInstance({provider});
> histSelectorObj.setNumberOfBins(newValue);
>
> While this sets numberOfBins correctly for histSelectorObj, the diagram
> rendering seems to fail. Upon closer inspection, it looks like a call to
> subscribeToHistogram1D is made when first instantiating the histogram
> selector histSelectorObj.
> Because you must pass in metadata here, which includes numberOfBins, I
> would think that the data subscription always expects any incoming data
> updates to be consistent with this original metadata, and that the data
> subscription doesn’t “know” that this value changed.
> Setting the value when calling newInstance seems to work fine:
>
> const histSelectorObj = HistogramSelector.newInstance({provider, numberOfBins: newValue});​
>
> Is there a way to change the metadata in the data subscription later on
> (or am I not understanding something)?
>
You are correct that currently, changing the number of bins once you have
created the component is not supported.  One approach to fix this is to
implement the "setNumberOfBins" method in the HistogramSelector (rather
than letting the CompositeClosureHelper generate that for us) and in that
method update the histgram1d subscription.  You can take a stab at that if
you like, I'd be happy to review the change.

> 2) Following up on the first question, is there a way to have different
> histograms have different number of bins within one InfoViz diagram?
>
This is also not currently supported, and I do not think it would be
straightforward to implement at the moment, but it's something we can keep
in mind.

Hope this helps,
Scott


> Thanks a lot for your help.
>
> -Mike
>>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=
> Paraview-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20170602/3f58b7b0/attachment-0001.html>


More information about the Paraview-developers mailing list