plot2d + gnuplot + line colors in rgb



Thanks a lot Mario,
I switched to draw2d instead of plot2d and it now works.
For those interested here is the code as modified on Mario's advice.

load(draw)$
draw2d(    color="#ff0000",
    explicit(max(-2.5, x-52.5),x, 40, 60),
    color="#000000",
    explicit(0,x, 40, 60),
    xrange=[40,60],
    yrange=[-4,8],
    xlabel="Underlying",
    ylabel="Option's Payoff",
    terminal=eps,
    file_name="/home/julien/Documents/donn?es/finance/maxima/plot-option"
)$


2009/2/23 Mario Rodriguez <biomates at telefonica.net>

> El dom, 22-02-2009 a las 21:30 +0100, Julien Martin escribi?:
> > Hello,
> >
> > I am new to maxima and would like to configure in detail the colors
> > used by my plot2d function.
> >
> > set_plot_option([gnuplot_preamble, "set style line 1 lt 2 lc 'green'
> > lw 2 pt 3 ps 5"])$
> > F(x) := max(-2.5, x-52.5)$
> > G(x) := 0 $
> > plot2d(    [F,G],
> >     [x, 40, 60],
> >     [y, -4, 8],
> >     [xlabel,"S0"],
> >     [ylabel,"Option's Payoff"],
> >     [gnuplot_term, ps],
> >     [gnuplot_out_file,
> > "/home/julien/Documents/donn?es/finance/maxima/plot-option.ps"]
> > #    [style, [lines, 3, 4],[lines, 3, 5]]
> > )$
> >
> > I want to use colors other than those default colors provided by
> > maxima. How can I specify the rgb colors.
> >
> > The above code does not give me other colors than the default ones.
> >
> > Can anyone help please,
>
>
> The draw package gives you some flexibility with colors. Type:
>
> ? color
>
>
>
> --
> Mario
>
>