diff options
Diffstat (limited to 'Master/texmf-dist/asymptote/palette.asy')
-rw-r--r-- | Master/texmf-dist/asymptote/palette.asy | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Master/texmf-dist/asymptote/palette.asy b/Master/texmf-dist/asymptote/palette.asy index 96bbf1550ec..2cb6e7c5475 100644 --- a/Master/texmf-dist/asymptote/palette.asy +++ b/Master/texmf-dist/asymptote/palette.asy @@ -245,12 +245,12 @@ pen[][] palette(real[][] f, pen[] palette) real Min=min(f); real Max=max(f); int n=f.length; - int m=n > 0 ? f[0].length : 0; - pen[][] p=new pen[n][m]; + pen[][] p=new pen[n][]; real step=(Max == Min) ? 0.0 : (palette.length-1)/(Max-Min); for(int i=0; i < n; ++i) { real[] fi=f[i]; - p[i]=sequence(new pen(int j) {return palette[round((fi[j]-Min)*step)];},m); + p[i]=sequence(new pen(int j) {return palette[round((fi[j]-Min)*step)];}, + f[i].length); } return p; } @@ -270,6 +270,7 @@ paletteticks PaletteTicks(Label format="", ticklabel ticklabel=null, } paletteticks PaletteTicks=PaletteTicks(); +paletteticks NoTicks=new ticks(int sign=-1) {return NoTicks;}; void palette(picture pic=currentpicture, Label L="", bounds bounds, pair initial, pair final, axis axis=Right, pen[] palette, |