color setting Eviews 11

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

amrsherif
Posts: 36
Joined: Mon Jul 23, 2018 4:34 pm

color setting Eviews 11

Postby amrsherif » Wed May 08, 2019 11:04 am

Hi,

I upgraded to EViews 11 today, and am having trouble changing colors in graphs. For example:

graph chart1.line series1 series2
chart1.textdefault font("Ariel",8,-b,-i,-u) textcolor(0,0,0) fillcolor(255,255,255) framecolor(255,255,255) existing

i get the following error: illegal color setting 255 in .....

It works if i change these to black/white. But adjusting other colors will be very difficult.

Am i doing anything wrong?

Thanks

EViews Jason
EViews Developer
Posts: 747
Joined: Tue Sep 16, 2008 3:50 pm

Re: color setting Eviews 11

Postby EViews Jason » Wed May 08, 2019 11:42 am

The docs need to be updated but when specifying RGB colors, you need to include '@RGB()'.

Changing your line to:

Code: Select all

chart1.textdefault font("Arial",8,-b,-i,-u) textcolor(@rgb(0,0,0)) fillcolor(@rgb(255,255,255)) framecolor(@rgb(255,255,255))

should fix it.

Note: 'Arial' was misspelled in your example.

amrsherif
Posts: 36
Joined: Mon Jul 23, 2018 4:34 pm

Re: color setting Eviews 11

Postby amrsherif » Wed May 08, 2019 12:17 pm

That works. Thanks for this (and for spotting the typo)


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 5 guests