[Paraview] Legend for superposed contour plots

Zenker, Dr. Matthias Matthias.Zenker at erbe-med.com
Tue Oct 4 02:49:18 EDT 2016


Hi,

thank you for your help.
I have now solved my problem, using colormaps. I had to get some dummy data (i.e. Data which would not disturb the plot I intend to view) containing values between 1 and the number of my desired legend entries. Then I displayed those and assigned a colormap to them. Now comes the decisive part: I have to check "categorical colormap" in the color map editor. Then I can assign textual labels to individual colors of my choice, and get a legend showing those correpondances. I have found this information in the ParaView guide after some searching around...

Matthias

> -----Ursprüngliche Nachricht-----
> Von: Armin Wehrfritz [mailto:dkxls23 at gmail.com]
> Gesendet: Montag, 3. Oktober 2016 19:03
> An: Zenker, Dr. Matthias; paraview at paraview.org
> Betreff: Re: AW: [Paraview] Legend for superposed contour plots
>
> OK, I see what you want to do... quite tricky. Would it be an option to plot
> the contour lines with matplotlib, i.e. pass the x,y coordinates to a python
> view? This way you would get the legend very easily in exactly the way you
> want it.
> For more information on how to do the plotting with matplotlib in ParaView
> see these two blog posts:
> https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__blog.kitware.com_matplotlib-2Dview-2Dcoming-2Din-2Dparaview-2D4-
> 2D1_&d=DQIC-g&c=7vND7vRFB1FzfxRXc-X80O-MJSZd5Q-IVyyYW-
> Ff2gY&r=3enlI3TuQDmO9BnMCnxq2Mfm4tAO6Z3_Ae1Yc57DMr4&m=DgSsu
> RMVqfqZLky0nuDP9Fhrc2D1znjJQaNpNOyKtnE&s=7uqJ34EPpCxUqLhqobjaIn
> biAMvFnxIEMZEG224F2PY&e=
> https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__blog.kitware.com_paraview-2Dpython-2Dview-2Dis-2Dnow-2Dmore-
> 2Dversatile_&d=DQIC-g&c=7vND7vRFB1FzfxRXc-X80O-MJSZd5Q-IVyyYW-
> Ff2gY&r=3enlI3TuQDmO9BnMCnxq2Mfm4tAO6Z3_Ae1Yc57DMr4&m=DgSsu
> RMVqfqZLky0nuDP9Fhrc2D1znjJQaNpNOyKtnE&s=hylOf03NAoWnCfqlSfg8q
> ZzZ70TfoUeB-3kgx6Go3gc&e=
>
> Otherwise I'm afraid I have no simple solution for your problem.
>
> -Armin
>
>
>
>
>
> On 10/03/2016 07:36 PM, Zenker, Dr. Matthias wrote:
> > Hi Armin,
> >
> > thank you for your answer. I am aware that I can adjust color scales.
> > My problem is that I don't get a legend at all in the first place. I
> > have several variants of a contour plot superposed, using solid colors
> > for each variant. I could of course add an empty contour plot, switch
> > the coloring to e.g. potential and fiddle around with the color map.
> > But that is not what I would like to have. But I would like to have a
> > legend similar to the legend of the "plot over line"
> > where I don't have a color map, but just colored line patterns with
> > their respective meaning, like
> >
> > [blue line here]  Variant 1
> > [red line here] Variant 2
> > [green line here]  Variant 3
> >
> > How can I generate such a legend?
> >
> > Thank you,
> >
> > Matthias
> > ________________________________________
> > Von: Armin Wehrfritz [dkxls23 at gmail.com]
> > Gesendet: Montag, 3. Oktober 2016 17:20
> > An: Zenker, Dr. Matthias; paraview at paraview.org
> > Betreff: Re: [Paraview] Legend for superposed contour plots
> >
> > Hi,
> >
> > I'm not sure if I understand completely what you try to do, but
> > probably it's already enough if you use a discrete color legend and
> > set the number of values to the number of contours. (See the attached
> > screenshot and state file.)
> >
> > Otherwise, the color legend can be adjusted in arbitrary ways using
> > python. For an example, have a look at the attached python script.
> > Note that the script is very specific for one of my cases, but
> > demonstrates how one can arbitrarily adjust color scales.
> >
> > HTH,
> > Armin
> >
> >
> >
> >
> > On 10/03/2016 05:41 PM, Zenker, Dr. Matthias wrote:
> >> Hi,
> >>
> >> I want to superpose different contour plots, each one having one
> >> contour line. They are color coded, i.e. I use the solid color and
> >> assign one color to each of the lines. Now I would like to have a
> >> legend for the resulting plot. Is there a way to build a customized
> >> legend, or a possibility to have a legened similar to what I get when
> >> I superpose several "plot over line" curves?
> >>
> >> Thank you,
> >> Matthias
> >> ________________________________
> >>
> >> Erbe Elektromedizin GmbH Firmensitz: 72072 Tuebingen
> >> Geschaeftsfuehrer: Christian O. Erbe, Reiner Thede Registergericht:
> >> Stuttgart HRB 380137
> >>
> >> _______________________________________________
> >> Powered by www.kitware.com
> >>
> >> Visit other Kitware open-source projects at
> >> https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__www.kitware.com_o
> >> pensource_opensource.html&d=DQIC-g&c=7vND7vRFB1FzfxRXc-X80O-
> MJSZd5Q-I
> >> VyyYW-
> Ff2gY&r=3enlI3TuQDmO9BnMCnxq2Mfm4tAO6Z3_Ae1Yc57DMr4&m=4OVo7
> Ltim
> >> Py4nobtdShncnalD63FZXVa_M0caLiidSo&s=CtwHRW8WgMx86gonlPL-
> v6dCSszMSKZ7
> >> 4ccctDBhEZw&e=
> >>
> >> Please keep messages on-topic and check the ParaView Wiki at:
> >> https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__paraview.org_Wiki
> >> _ParaView&d=DQIC-g&c=7vND7vRFB1FzfxRXc-X80O-MJSZd5Q-IVyyYW-
> Ff2gY&r=3e
> >>
> nlI3TuQDmO9BnMCnxq2Mfm4tAO6Z3_Ae1Yc57DMr4&m=4OVo7LtimPy4nob
> tdShncnalD
> >>
> 63FZXVa_M0caLiidSo&s=hiRgwYDb7Jurqx5AeuLGWztGItixCAmBNxB6TuKGd
> yM&e=
> >>
> >> Search the list archives at:
> >> https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__markmail.org_sear
> >> ch_-3Fq-3DParaView&d=DQIC-g&c=7vND7vRFB1FzfxRXc-X80O-MJSZd5Q-
> IVyyYW-F
> >>
> f2gY&r=3enlI3TuQDmO9BnMCnxq2Mfm4tAO6Z3_Ae1Yc57DMr4&m=4OVo7L
> timPy4nobt
> >>
> dShncnalD63FZXVa_M0caLiidSo&s=LnlXczexP9qSyy5yaVJ9iOqQGxxARxLqNh
> s0qY2
> >> 0FAM&e=
> >>
> >> Follow this link to subscribe/unsubscribe:
> >> https://urldefense.proofpoint.com/v2/url?u=http-3A__public.kitware.co
> >> m_mailman_listinfo_paraview&d=DQIC-g&c=7vND7vRFB1FzfxRXc-X80O-
> MJSZd5Q
> >> -IVyyYW-
> Ff2gY&r=3enlI3TuQDmO9BnMCnxq2Mfm4tAO6Z3_Ae1Yc57DMr4&m=4OVo7
> Lt
> >>
> imPy4nobtdShncnalD63FZXVa_M0caLiidSo&s=ao8KBcoBSWZvKaM_IrFfAENL
> _6Ax_u
> >> 14rVTubrdVGSw&e=
> >>
> > ________________________________
> >
> > Erbe Elektromedizin GmbH Firmensitz: 72072 Tuebingen
> > Geschaeftsfuehrer: Christian O. Erbe, Reiner Thede Registergericht:
> Stuttgart HRB 380137
> >
________________________________

Erbe Elektromedizin GmbH Firmensitz: 72072 Tuebingen Geschaeftsfuehrer: Christian O. Erbe, Reiner Thede Registergericht: Stuttgart HRB 380137



More information about the ParaView mailing list