plot2d eps file with black lines??



Hello Edwin,

> You are right that this version produces NO error message.
>
> However, the eps file foreground color remains blue (NOT black).
> In other words,  "set style line 1 lc 'black' " has no effect, including no 
> error.
>
>   

If you set line style this way:

set style line 1 lc rgb 'black'

and then you want to make use of it inside the plot command (in 
maxout.gnuplot), you have to write

'-' title "sin(x)" with lines ls 1  (see: ls, not lt)

Now, the sinus function should appear in black. In the script generated 
by plot2d, the "set style etc" has no effect on this plot. Maybe this 
piece of code is there for other reasons. Sometimes, functions of 
package draw also write some pieces of code that are not necessary por 
the current plot, but this gives me some flexibility in other situations.


> (By the way, draw2d(...) sends the eps file to
>  c:\Documents and Settings\Edwin Woollett\maxima_out.eps
>  if I leave out the whole file_name element. Is there something I can
>  define in my maxima-init.mac file so all eps files would go to c:/work2 ? 
> That way
>  I could leave out the path part "c:/work2" and just use file_name = 
> "myfile". )
>   
I've commited a new draw.lisp to cvs about two weeks ago that solves 
this. With this new version, if you write in maxima-init.mac something as

maxima_userdir: "c:/work2" $

all files generated by draw will be placed there. I couldn't check this 
in windows, but should work.

> The draw package also gives me access to a much larger set of colors.
> (Is this because I have installed gnuplot 4.2.2 as an independent 
> application
>   on my hard drive, or does draw2d(...) behave the same way w/o a separate
> gnuplot program ? ie does maxima 5.13 include an up-to-date version of 
> gnuplot
> by default??)
>   
I think that the gnuplot version included in the windows binary is 
4.2.0, but I'm not sure. Some of the bugs fixed in 4.2.2, were reported 
by me to the gnuplot team, and I thank Ethan Merrit and colleagues for 
all the quick fixes! As far as I know, at this moment draw is 100% 
compatible with gnuplot 4.2.2, but 4.2.0 users could find some small 
problems here and there.

Regarding colors, they were highly improved in version 4.2.0.

> If the draw2d (...) function was designed with the same syntax style as 
> plot2d, the additional
> elements of control over each element could be included in several ways

> For example,  the "more control  mode" over x-axis-width could be employed 
> by
> the user by typing [x,  [  [a1,b1],   [a2,b2], ...etc ]  ], instead of the 
> more often used form
>  [x, a, b].
>
> Likewise, the user could be allowed to use either numbers or words for 
> specifying the color desired,
> so  [lines, 4, 2],  [lines, 4, red ],  [lines, 4,  "light-salmon'],  etc 
> would be allowed.
>  ( and why not let the typist use  [li, 4, 2]  instead of  [lines, 4, 2] 
>   ).
>
> Using a number for line width  clearly fits into the plot2d scheme.
>   

Some of these items have been discussed earlier in this list:

http://www.math.utexas.edu/pipermail/maxima/2007/thread.html

under subject  ' "draw" package questions'. Personally, I find the 
square-brackets syntax a bit difficult to read.

But you are right that some plots can be obtained from plot2d with less 
typing. When I need to draw many similar graphics, I define a Maxima 
function to call draw2d, with a very short name and a minimum number of 
arguments, shadowing graphics options and object constructors.

Thanks a lot for your interesting points of view.

Mario

-- 
Mario Rodriguez Riotorto
www.biomates.net