Changeset 8566:3b2557b235a2 in orange


Ignore:
Timestamp:
08/02/11 02:19:31 (3 years ago)
Author:
matejd <matejd@…>
Branch:
default
Convert:
bd2d9c5ad4f57b2aaba94c181f481c472087df9b
Message:

Rotated symbols, better legend

Location:
orange/OrangeWidgets
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/Prototypes/OWScatterPlot3D.py

    r8563 r8566  
    421421                colors = [[c.red()/255., c.green()/255., c.blue()/255., self.alpha_value/255.] for c in colors] 
    422422                palette_colors = [palette[i] for i in range(len(color_attr.values))] 
    423                 color_legend_items = [[Symbol.TRIANGLE, [c.red()/255., c.green()/255., c.blue()/255., 1], 1, title] 
     423                color_legend_items = [[0, [c.red()/255., c.green()/255., c.blue()/255., 1], 1, title] 
    424424                    for c, title in zip(palette_colors, color_attr.values)] 
    425425            else: 
     
    474474                if i == num_symbols-1: 
    475475                    title = ', '.join(titles[i:]) 
    476                 self.plot.legend.add_item(i, (0,0,0,1), 1, '{0}={1}'.format(shape_attr.name, title)) 
     476                if color_legend_items: 
     477                    self.plot.legend.add_item(i, color_legend_items[i][1], 1, '{0}={1}'.format(shape_attr.name, title)) 
     478                else: 
     479                    self.plot.legend.add_item(i, (0,0,0,1), 1, '{0}={1}'.format(shape_attr.name, title)) 
    477480                if i == num_symbols-1: 
    478481                    break 
    479482 
    480         if color_legend_items: 
     483        if color_legend_items and not self.shape_attr > 0: 
    481484            for item in color_legend_items: 
    482485                self.plot.legend.add_item(*item) 
  • orange/OrangeWidgets/plot/owplot3d.py

    r8565 r8566  
    11011101 
    11021102        if symbols == None: 
    1103             symbols = [Symbol.TRIANGLE for _ in range(num_points)] 
     1103            symbols = [Symbol.RECT for _ in range(num_points)] 
    11041104 
    11051105        # We scale and translate data into almost-unit cube centered around (0,0,0) in plot-space. 
  • orange/OrangeWidgets/plot/owprimitives3d.py

    r8564 r8566  
    102102    file_name = symbol_edge_map[symbol] 
    103103    file_name = os.path.join(os.path.dirname(__file__), file_name) 
     104    print(file_name) 
    104105    lines = open(file_name).readlines() 
    105106    vertices_lines = filter(lambda line: line.startswith('v'), lines) 
Note: See TracChangeset for help on using the changeset viewer.