Hello,
I am running plplot version 5.9.5 on MacOS Snow Leopard with a code that makes
several line plots. If I use the default black background, then I can call
plcol0 before each call to plline to set different colors for each line as
expected. However, if I call plscolbg(255,255,255) (before plinit) to get a
white background, then all of the lines that should have different colors now
only come out in black. It seems that calling plscolbg has the unintended
consequence of wiping out all of the colors in Map0 so that now color 0 is
white and the others (colors 1 - 15) are now black. Any suggestions as to how
to get curves with different colors when using a white background? A test code
is given below.
-Thanks, Don
implicit none
integer :: ns, mpol, ntor, mnmax, ljmn, js, mn, ipsi, nstep
1 , nstart, j, i, k, nfp, ierr, ns1, mnmax_nyq, itst, ii, err
real*8, dimension(200) :: rmaj_ar1, zz_ar1,
1 rmaj_ar2, zz_ar2, rmaj_ar3, zz_ar3
real*8, dimension(200) :: rmaj1, rmaj2, rmaj3, rmaj4
real*8, dimension(200) :: zmaj1, zmaj2, zmaj3, zmaj4
real*8, dimension(200) :: rplot, zplot
real*8 :: two_pi, thet, zeta, rmaj, zz, arg
real*8 :: rmin1, rmax1, zmin1, zmax1
integer nargs, numargs, numchars, iarg
C-----------------------------------------------
two_pi = 8.d0*atan(1.d0)
ns1 = 10; nfp = 1; j = 1
do iarg = 1,3
zeta = (two_pi/4.d0)*dble(j-1)/dble(nfp)
do i=1,200
thet = (i - 1)*two_pi/199.
rmaj = 6.d0; zz = 0.d0
arg = thet
if(iarg .eq. 1) then
rmaj = rmaj + 2.*cos(arg)
zz = zz + 2.*sin(arg)
else if(iarg .eq. 2) then
rmaj = rmaj + cos(arg)
zz = zz + 2.*sin(arg)
else if(iarg .eq. 3) then
rmaj = rmaj + 2.*cos(arg)
zz = zz + sin(arg)
end if
if(iarg .eq. 1) then
rmaj_ar1(i) = rmaj; zz_ar1(i) = zz
else if(iarg .eq. 2) then
rmaj_ar2(i) = rmaj; zz_ar2(i) = zz
else if(iarg .eq. 3) then
rmaj_ar3(i) = rmaj; zz_ar3(i) = zz
end if
end do !i=1,200
rmin1 = 3.; rmax1 = 9.; zmin1 = -3.; zmax1 = 3.
end do !iarg = 1,3
call plscolbg(255,255,255)
call plinit()
call plenv(rmin1,rmax1,zmin1,zmax1,1,1)
do i = 1,200
rplot(i) = rmaj_ar1(i); zplot(i) = zz_ar1(i)
end do
call plcol0(1)
call plline(200,rplot,zplot,0)
do i = 1,200
rplot(i) = rmaj_ar2(i); zplot(i) = zz_ar2(i)
end do
call plcol0(3)
call plline(200,rplot,zplot,0)
do i = 1,200
rplot(i) = rmaj_ar3(i); zplot(i) = zz_ar3(i)
end do
call plcol0(10)
call plline(200,rplot,zplot,0)
call plend
stop
end
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Plplot-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-general