|
From: <Mik...@vo...> - 2005-03-09 09:01:21
|
Hello Andreas=2C = I faced the same problem over a year ago and found a solution=2E I wanted= to have all curves in a graph identical in black and white and color ver= sions=2E The aim was to have identical graphs in a textbook=2C which is i= ssued in both a black and white edition for students and a more expensive= color edition=2E I was also able to get the same color for curves=2C fig= ure and table captions=2C and headings in the book=2C but that is another= story=2E My solution is to edit the created eps file instead of forcing gnuplot to= create the colored lines the way you want=2E I am no expert in the Posts= cript language but after a look in a Postscript manual and some experimen= ts with the eps file I found a quite simple solution=2E = I did it in the following way using gnuplot ver=2E 3=2E7 and OS/2 operati= ng system=2E Step 1=2E Create the black and white graph in an eps file Step 2=2E Open the eps file with a text editor=2E The first lines will lo= ok something like this =25!PS-Adobe-2=2E0 EPSF-2=2E0 =25=25Title=3A c=3A/text/komp2/gp/bhkweta=2Eeps =25=25Creator=3A gnuplot 3=2E7 patchlevel 0 =25=25CreationDate=3A Fri May 16 22=3A13=3A28 2003 =25=25DocumentFonts=3A (atend) =25=25BoundingBox=3A 50 45 310 302 =25=25Orientation=3A Portrait =25=25EndComments /gnudict 256 dict def gnudict begin /Color false def /Solid false def /gnulinewidth 5=2E000 def =2E =2E =2E Change /Color false def to /Color true def Then go down some lines until you find the definitions of the frames and = lines in the graph=2E In my original black and white graph file it looks like this = /LTb =7B BL =5B=5D 0 0 0 DL =7D def /LTa =7B AL =5B1 dl 2 dl=5D 0 setdash 0 0 0 setrgbcolor =7D def /LT0 =7B PL =5B=5D 1 0 0 DL =7D def /LT1 =7B PL =5B4 dl 2 dl=5D 0 1 0 DL =7D def /LT2 =7B PL =5B2 dl 3 dl=5D 0 0 1 DL =7D def /LT3 =7B PL =5B1 dl 1=2E5 dl=5D 1 0 1 DL =7D def /LT4 =7B PL =5B5 dl 2 dl 1 dl 2 dl=5D 0 1 1 DL =7D def =2E =2E =2E =2E I found that /LT0=2C /LT1 etc are the line types and by changing the rgb = code you can easily change the colors of the lines and keep the the lines= solid=2C dashed etc=2E In this case the changes were /LTb =7B BL =5B=5D 0 0 0 DL =7D def /LTa =7B AL =5B1 dl 2 dl=5D 0 setdash 0 0 0 setrgbcolor =7D def /LT0 =7B PL =5B=5D 0=2E133 0=2E268 0=2E618 DL =7D def /LT1 =7B PL =5B4 dl 2 dl=5D 0=2E133 0=2E268 0=2E618 DL =7D def /LT2 =7B PL =5B2 dl 3 dl=5D 0=2E133 0=2E268 0=2E618 DL =7D def /LT3 =7B PL =5B1 dl 1=2E5 dl=5D 1 0 1 DL =7D def /LT4 =7B PL =5B5 dl 2 dl 1 dl 2 dl=5D 0 1 1 DL =7D def =2E =2E =2E which gives solid and dashed lines with the same blue color=2E Finally sa= ve the edited eps file=2E = /Mikael ---------------------------------------------------- Mikael N=E4slund=2C Univ=2Elektor/Ass=2Eprof=2E V=E4rme och Kraftteknik/Heat =26 Power Engineering Lunds Tekniska H=F6gskola/Lund Institute of Technology (Lund University) P=2EO=2E Box 118 SE-221 00 Lund=2C Sweden = Phone=3A + (0)46 222 92 74 Fax=3A + (0)46 222 47 17 Mobile phone=3A + (0)70 794 08 95 = ----- Original Message ----- From=3A Andreas Bott =3Ca=2Ebott=40uni-bonn=2Ede=3E Date=3A Tuesday=2C March 8=2C 2005 4=3A29 pm Subject=3A =5BGnuplot-info=5D drawing color lines =3E dear colleagues=2C =3E = =3E can you tell me how i can plot two curves in a single plot=2C the = =3E first = =3E one being a solid blue curve=2C the second one being dashed blue curv= e =3E = =3E or=3A is it possible to have different colors of solid lines in a = =3E single plot=2E =3E = =3E or=3A is it possible to change the color of a given linetype=2E =3E = =3E thanks for your help=2E =3E = =3E best regards=2C =3E = =3E andreas =3E = =3E = =3E ------------------------------------------------------- =3E SF email is sponsored by - The IT Product Guide =3E Read honest =26 candid reviews on hundreds of IT Products from real = =3E users=2EDiscover which products truly live up to the hype=2E Start = =3E reading now=2E =3E http=3A//ads=2Eosdn=2Ecom/=3Fad=5Fid=3D6595=26alloc=5Fid=3D14396=26op= =3Dclick =3E =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F =3E Gnuplot-info mailing list =3E Gnuplot-info=40lists=2Esourceforge=2Enet =3E https=3A//lists=2Esourceforge=2Enet/lists/listinfo/gnuplot-info =3E |