[Orca-users] Color selection

Dragon dragon at raytheon.com
Fri May 21 09:47:13 PDT 2004


Funny, that's exactly the section of code I was staring at last night, 
while trying to debug this thing.  I then spent a while trying to figure 
out how new_plot_ref->{color} gets populated, as I figured there was an 
OBOE there, or end-condition logical error, but I got tired and went 
home before I found an answer. ;)  And you solved it in 11 minutes!  Go, 
Blair! :)

I'll let you know how it works out.

--Dragon
PS - modified Rajesh's AIX perl script data collector is almost ready 
for submission.  One last plot to fix.

Blair Zajac wrote:

> Blair Zajac wrote:
>
>> If you can, please take a look at helping to debug the volatile patch 
>> and send any fixes back to the mailing list.
>
>
> I think this part of the patch for ImageFile.pm
>
> +  # $i should already be set to the number of elements, but i'm
> paranoid....
> +  $i= @{$exist_plot_ref->{legend}};
> +  for (my $k=0; $k < @{$new_plot_ref->{legend}}; $k++) {
> +       unless ( defined( $exist_legend{$new_plot_ref->{legend}[$k]} ) 
> ) {
> +        # there may be more attributes, but these are the ones that
> seem to matter
> +        $exist_plot_ref->{legend}[$i] = $new_plot_ref->{legend}[$k];
> +               $exist_plot_ref->{line_type}[$i] =
> $new_plot_ref->{line_type}[$k];
> +        $exist_plot_ref->{color}[$i] = $new_plot_ref->{color}[$k];
> +               $exist_plot_ref->{summary_format}[$i] =
> $new_plot_ref->{summary_format}[$k];
> +               $i++;
> +       }
> +  }
>
> Try changing the
>
> $exist_plot_ref->{color}[$i] = $new_plot_ref->{color}[$k];
>
> to
>
> $exist_plot_ref->{color}[$i] = get_color($i);
>
> You'll also need to change
>
> use Orca::Config    qw(%config_global
>                        @config_groups
>                        @config_plots);
>
> to
>
> use Orca::Config    qw(%config_global
>                        @config_groups
>                        @config_plots
>                        get_color);
>
> Best,
> Blair





More information about the Orca-users mailing list