[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Transparent lines
From: |
Markus Mützel |
Subject: |
Re: Transparent lines |
Date: |
Mon, 15 Mar 2021 19:08:51 +0100 |
Am 15. März 2021 um 18:17 Uhr schrieb "Nicholas Jankowski":
> > I would like to have the plot lines with some sort of translucency. In
> > Matlab, I can then put
> > p1.Color(4)=0.05
> > to set the alpha channel to 5%
>
> playing with this a bit myself, i was wondering what changed in p1.
They seem to be storing that information in this (hidden) hg2 property of the
line:
>> hl = plot([0,1]);
>> set(hl, 'Color', [0, 0.447, 0.741, 0.5])
>> hl.Edge.ColorData
ans =
4×1 uint8 column vector
0
114
189
128
See also:
https://undocumentedmatlab.com/articles/plot-line-transparency-and-color-gradient
Octave doesn't support hg2 yet. So, if we implemented this, we'd need to store
it somehow differently.
Markus