Discussion:
[pyqtgraph] Exporting only with gradient of HistogramLUTItem
Luka Drmic
2018-08-10 10:29:38 UTC
Permalink
So i want to export some graphs as png, but i would like it to have only
the main graph and gradient item of the histogramLUTitem. Pretty much what
matplotlib does. Have my main graph (image) and on the side have my
gradient edit item with values next to it.

I tried hiding everything except the gradient item but that leaves me with
two lines that ure used to slide along axis of LUT item, and in addition to
that it removes axis values, and i wouold like to keep those.

[image: hideAll.png] <about:invalid#zClosurez>








Desired items on the export png:

[image: Desired.png] <about:invalid#zClosurez>
--
You received this message because you are subscribed to the Google Groups "pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/323e5faf-ecb5-4328-b9bc-3617c2d1ced3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Patrick
2018-08-13 03:48:07 UTC
Permalink
Perhaps you could use a GradientLegend
(http://www.pyqtgraph.org/documentation/_modules/pyqtgraph/graphicsItems/GradientLegend.html#GradientLegend)
and set its gradient and labels to those of the HistogramLUTItem. If you're
exporting the graph, you may need to do some trickery, like hide/remove the
HistogramLUTItem and replace it with the GradientLegend, do the export,
then put the HistogramLUTItem back. Or if you don't care about the
histogram and editing the gradient, just stick with the GradientLegend.
Post by Luka Drmic
So i want to export some graphs as png, but i would like it to have only
the main graph and gradient item of the histogramLUTitem. Pretty much what
matplotlib does. Have my main graph (image) and on the side have my
gradient edit item with values next to it.
I tried hiding everything except the gradient item but that leaves me with
two lines that ure used to slide along axis of LUT item, and in addition to
that it removes axis values, and i wouold like to keep those.
[image: hideAll.png]
[image: Desired.png]
--
You received this message because you are subscribed to the Google Groups "pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/4031a72c-d7a2-4e7a-8b64-4ccf7435b573%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...