Re: Transparent lines

Markus Mützel <[email protected]>
Newsgroups gmane.comp.gnu.octave.general
Message-ID <trinity-5a5c5204-1a49-4af5-9656-c1a4be1c5741-1615831731290@3c-app-gmx-bs71>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.