Re: Problems plotting arrays
- To: mathgroup at yoda.physics.unc.edu
- Subject: Re: Problems plotting arrays
- From: twj
- Date: Sun, 1 Nov 92 11:29:55 CST
>**BUG(?) #2** >The thickness directives in > >ListContourPlot[b, >ContourSmoothing->Automatic, >ContourStyle->{{Thickness[.002]}, {Thickness[.002]}, > {Thickness[.002]}, {Thickness[.002]}, {Thickness[.006]}}, >Ticks->Automatic] > >which under Mma 2.0 made every fifth contour 3 times as thick, >no longer work, giving the error message > >ContourStyle::style: > -- Message text not found -- ( > {{Thickness[0.002]}, <<3>>, {Thickness[0.006]}}) . >and all contours come out the same thickness. [But boy! -Is >the contouring faster than it was under Mma 2.0!] Apart from this, >the contour plots are correct. > >Can anyone confirm these problems and/or suggest workarounds? This is a bug in the style specification which will be fixed in the next release. The bug is that the length of the style specification must match the number of contours. This can be fixed by giving the style specification to have a length the same as the number of contours. It can also be fixed by a top-level rule: Unprotect[ ContourGraphics] ContourGraphics[ dat_, opt1___, Contours -> ncont_Integer, opt2___, ContourStyle -> style_List, opt3___ /; Length[ style] =!= ncont ] := ContourGraphics[ dat, opt1, Contours -> ncont, opt2, ContourStyle -> Table[ Part[ style, 1+Mod[ i-1, Length[ style]]], {i,1,ncont}], opt3 ] ContourGraphics[ dat_, opt1___, Contours -> cont_List, opt2___, ContourStyle -> style_List, opt3___ /; Length[ style] =!= Length[cont] ] := ContourGraphics[ dat, opt1, Contours -> ncont, opt2, ContourStyle -> Table[ Part[ style, 1+Mod[ i-1, Length[ style]]], {i,1,ncont}], opt3 ] Protect[ ContourGraphics] Then ContourPlot[ Sin[x y], {x,0,2Pi}, {y,0,Pi}, ContourStyle-> {{Thickness[.002]}, {Thickness[.002]}, {Thickness[.002]}, {Thickness[.002]}, {Thickness[.006]}}]