Skip to content

Commit

Permalink
Merge pull request #6 from gnudatalanguage/GillesDuvert-patch-1
Browse files Browse the repository at this point in the history
updated because colors were wrong
  • Loading branch information
GillesDuvert authored Dec 16, 2020
2 parents bb2459c + 87f830f commit ac8edcb
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions notebooks/demo_gdl.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,14 @@
"x = 2*!PI*0.01*indgen(100)\n",
"y1 = sin(x)\n",
"y2 = cos(x)\n",
"loadct,39\n",
"device,decomposed=0 ;;colors will be numbers from 0 to 255, as index in a colortable\n",
"loadct,39 ;; only useful if decomposed=0 : this is the colortable chosen.\n",
";; Note: if, as is the default, decomposed=1, colors are way more numerous (16777216!)\n",
";; but must be defined as 'RRGGBB'x where each color component\n",
";; (Red,Green,Blue) can take the 256 values from '00' to 'FF'\n",
"window,xsize=800,ysize=500\n",
"plot,x,y1,title='Trig Functions',xtitle='Radians',ytitle='Amplitude',xrange=[0,6],charsize=1.5,background=255,color=0\n",
"plot,x,y1,title='Trig Functions',xtitle='Radians',ytitle='Amplitude',xrange=[0,6],charsize=1.5,back=255,color=0\n",
";; the equivalent in 'decomposed mode' would have said: background='FFFFFF'x,color='0'x\n",
"oplot,x,y2,color=50"
]
},
Expand Down Expand Up @@ -230,4 +235,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}

0 comments on commit ac8edcb

Please sign in to comment.