Fill + RGB colors produces only black plot

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Fill + RGB colors produces only black plot

Paul
Hello everyone, I'm quite new to Octave.

I'm trying to use the fill function on Octave 3.8.2-4 with different RGB color combinations.
Unfortunately what I get is typically black areas.

For example, using the demonstration on octave.sourceforge.net and changing the colors, I get a black polygon on the left and a transparent one on the right:

t1 = (1/16:1/8:1) * 2*pi;
t2 = ((1/16:1/8:1) + 1/32) * 2*pi;
x1 = sin (t1) - 0.8;
y1 = cos (t1);
x2 = sin (t2) + 0.8;
y2 = cos (t2);
h = fill (x1,y1,[0.5 1 0], x2,y2,[0.5 0 0.5]);

Do you have any ideas about this problem?

BTW I don't get this problem with line colors.

Hope it's not a silly question.
Thank you
Reply | Threaded
Open this post in threaded view
|

Re: Fill + RGB colors produces only black plot

Dmitri A. Sergatskov


On Sat, Jan 3, 2015 at 12:04 PM, Paul <[hidden email]> wrote:
Hello everyone, I'm quite new to Octave.

I'm trying to use the fill function on Octave 3.8.2-4 with different RGB
color combinations.
Unfortunately what I get is typically black areas.

For example, using the demonstration on octave.sourceforge.net and changing
the colors, I get a black polygon on the left and a transparent one on the
right:

t1 = (1/16:1/8:1) * 2*pi;
t2 = ((1/16:1/8:1) + 1/32) * 2*pi;
x1 = sin (t1) - 0.8;
y1 = cos (t1);
x2 = sin (t2) + 0.8;
y2 = cos (t2);
h = fill (x1,y1,[0.5 1 0], x2,y2,[0.5 0 0.5]);

Do you have any ideas about this problem?


​This appears to be a bug in fill.m
You can replace it with the more recent version (from development branch,
attached) and see if that helps.​


​Dmitri.



_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave

fill.m (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Fill + RGB colors produces only black plot

Paul
Dmitri A. Sergatskov wrote
On Sat, Jan 3, 2015 at 12:04 PM, Paul <[hidden email]> wrote:

> Hello everyone, I'm quite new to Octave.
>
> I'm trying to use the fill function on Octave 3.8.2-4 with different RGB
> color combinations.
> Unfortunately what I get is typically black areas.
>
> For example, using the demonstration on octave.sourceforge.net and
> changing
> the colors, I get a black polygon on the left and a transparent one on the
> right:
>
> t1 = (1/16:1/8:1) * 2*pi;
> t2 = ((1/16:1/8:1) + 1/32) * 2*pi;
> x1 = sin (t1) - 0.8;
> y1 = cos (t1);
> x2 = sin (t2) + 0.8;
> y2 = cos (t2);
> h = fill (x1,y1,[0.5 1 0], x2,y2,[0.5 0 0.5]);
>
> Do you have any ideas about this problem?
>
>
​This appears to be a bug in fill.m
You can replace it with the more recent version (from development branch,
attached) and see if that helps.​


​Dmitri.


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave


fill.m (8K) <http://octave.1599824.n4.nabble.com/attachment/4667975/0/fill.m>
Thanks for your quick reply.

I tried with the new version of fill.m and I got this error:

error: '__patch__' undefined near line 116 column 22
error: called from:
error:   [...] at line 116, column 20
error:   [...] at line 18, column 3

Then I removed the underscore characters and it went better, because at least one of the two polygons appeared, but I got another error:

error: element number 2 undefined in return list
error: called from:
error:   [...] at line 116, column 20
error:   [...] at line 18, column 3

...and at this point I have no idea what to do.

Reply | Threaded
Open this post in threaded view
|

Re: Fill + RGB colors produces only black plot

Dmitri A. Sergatskov


On Sun, Jan 4, 2015 at 8:11 AM, Paul <[hidden email]> wrote:

I tried with the new version of fill.m and I got this error:

error: '__patch__' undefined near line 116 column 22
error: called from:


​Where did you put the new fill.m?

Dmitri.
--


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Fill + RGB colors produces only black plot

Paul
Dmitri A. Sergatskov wrote
On Sun, Jan 4, 2015 at 8:11 AM, Paul <[hidden email]> wrote:

>
> I tried with the new version of fill.m and I got this error:
>
> error: '__patch__' undefined near line 116 column 22
> error: called from:
>


​Where did you put the new fill.m?

Dmitri.
--


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave

In the same folder of the main file:

error: element number 2 undefined in return list
error: called from:
error:   C:\Users\Paul\Documents\Octave\output\fill.m at line 116, column 20
error:   C:\Users\Paul\Documents\Octave\output\fill_example.m at line 18, column 3


Reply | Threaded
Open this post in threaded view
|

Re: Fill + RGB colors produces only black plot

Julien Bect
Le 05/01/2015 08:57, Paul a écrit :
> In the same folder of the main file:
>
> error: element number 2 undefined in return list
> error: called from:
> error:   C:\Users\Paul\Documents\Octave\output\fill.m at line 116, column 20
> error:   C:\Users\Paul\Documents\Octave\output\fill_example.m at line 18,
> column 3

You need to put it where the original fill.m was (use which to find out).

__patch__ is a private function located there, which cannot be found if
you put fill.m somewhere else.

@++
Julien


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Fill + RGB colors produces only black plot

Paul
Julien Bect wrote
Le 05/01/2015 08:57, Paul a écrit :
> In the same folder of the main file:
>
> error: element number 2 undefined in return list
> error: called from:
> error:   C:\Users\Paul\Documents\Octave\output\fill.m at line 116, column 20
> error:   C:\Users\Paul\Documents\Octave\output\fill_example.m at line 18,
> column 3

You need to put it where the original fill.m was (use which to find out).

__patch__ is a private function located there, which cannot be found if
you put fill.m somewhere else.

@++
Julien


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Now it works as expected.

Thank you very much!