From a8d61a29d6e205de86b14188a86cb792b1457878 Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Sat, 6 Jun 2015 11:09:15 +0000 Subject: [PATCH] added newlines at end of colormap.exports --- lib/damask/colormaps.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/damask/colormaps.py b/lib/damask/colormaps.py index 35c715fa0..851de51e9 100644 --- a/lib/damask/colormaps.py +++ b/lib/damask/colormaps.py @@ -399,24 +399,26 @@ class Colormap(): return Color(lo.model,interpolation) def write_paraview(RGB_vector): - colormap ='\n' + colormap = '\n' for i in range(len(RGB_vector)): - colormap+='\n' - colormap+='' + colormap += '\n'%(RGB_vector[i][0],RGB_vector[i][1],RGB_vector[i][2]) + colormap += '\n' return colormap def write_gmsh(RGB_vector): - return 'View.ColorTable = {\n' \ + return 'View.ColorTable = {\n' \ + ',\n'.join(['{%s}'%(','.join(map(lambda x:str(x*255.0),v))) for v in RGB_vector]) \ - + '\n}' + + '\n}\n' def write_raw(RGB_vector): - return '\n'.join(['%s'%('\t'.join(map(lambda x:str(x),v))) for v in RGB_vector]) + return '\n'.join(['%s'%('\t'.join(map(lambda x:str(x),v))) for v in RGB_vector]) \ + + '\n' def write_GOM(RGB_vector): - return '1 1 '+str(name)+' 9 '+str(name)+' 0 1 0 3 0 0 -1 9 \ 0 0 0 255 255 255 0 0 255 '\ - + '30 NO_UNIT 1 1 64 64 64 255 1 0 0 0 0 0 0 3 0 ' + str(len(RGB_vector))+' '\ - .join([' 0 %s 255 1'%(' '.join(map(lambda x:str(int(x*255.0)),v))) for v in reversed(RGB_vector)])+' ' + return '1 1 ' + str(name) + ' 9 ' + str(name) + ' 0 1 0 3 0 0 -1 9 \ 0 0 0 255 255 255 0 0 255 ' \ + + '30 NO_UNIT 1 1 64 64 64 255 1 0 0 0 0 0 0 3 0 ' + str(len(RGB_vector)) \ + + ' '.join([' 0 %s 255 1'%(' '.join(map(lambda x:str(int(x*255.0)),v))) for v in reversed(RGB_vector)])+' ' colors = []