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://blog.kitware.com/matplotlib-view-coming-in-paraview-4-1/
https://blog.kitware.com/paraview-python-view-is-now-more-versatile/
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 [[email protected]]
Gesendet: Montag, 3. Oktober 2016 17:20
An: Zenker, Dr. Matthias; [email protected]
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_opensource_opensource.html&d=DQIC-g&c=7vND7vRFB1FzfxRXc-X80O-MJSZd5Q-IVyyYW-Ff2gY&r=3enlI3TuQDmO9BnMCnxq2Mfm4tAO6Z3_Ae1Yc57DMr4&m=4OVo7LtimPy4nobtdShncnalD63FZXVa_M0caLiidSo&s=CtwHRW8WgMx86gonlPL-v6dCSszMSKZ74ccctDBhEZw&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=3enlI3TuQDmO9BnMCnxq2Mfm4tAO6Z3_Ae1Yc57DMr4&m=4OVo7LtimPy4nobtdShncnalD63FZXVa_M0caLiidSo&s=hiRgwYDb7Jurqx5AeuLGWztGItixCAmBNxB6TuKGdyM&e=
Search the list archives at:
https://urldefense.proofpoint.com/v2/url?u=http-3A__markmail.org_search_-3Fq-3DParaView&d=DQIC-g&c=7vND7vRFB1FzfxRXc-X80O-MJSZd5Q-IVyyYW-Ff2gY&r=3enlI3TuQDmO9BnMCnxq2Mfm4tAO6Z3_Ae1Yc57DMr4&m=4OVo7LtimPy4nobtdShncnalD63FZXVa_M0caLiidSo&s=LnlXczexP9qSyy5yaVJ9iOqQGxxARxLqNhs0qY20FAM&e=
Follow this link to subscribe/unsubscribe:
https://urldefense.proofpoint.com/v2/url?u=http-3A__public.kitware.com_mailman_listinfo_paraview&d=DQIC-g&c=7vND7vRFB1FzfxRXc-X80O-MJSZd5Q-IVyyYW-Ff2gY&r=3enlI3TuQDmO9BnMCnxq2Mfm4tAO6Z3_Ae1Yc57DMr4&m=4OVo7LtimPy4nobtdShncnalD63FZXVa_M0caLiidSo&s=ao8KBcoBSWZvKaM_IrFfAENL_6Ax_u14rVTubrdVGSw&e=
________________________________
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
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the ParaView Wiki at:
http://paraview.org/Wiki/ParaView
Search the list archives at: http://markmail.org/search/?q=ParaView
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview