Changeset 8558:c9f3719c4a59 in orange


Ignore:
Timestamp:
08/01/11 19:03:59 (3 years ago)
Author:
matejd <matejd@…>
Branch:
default
Convert:
1cd3d576c9af3bc7ff88e0af9498315902c15354
Message:

Better symbol scale slider

Location:
orange/OrangeWidgets
Files:
2 edited

Legend:

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

    r8551 r8558  
    5757        self.label_attr = None 
    5858 
    59         self.symbol_scale = 5 
    6059        self.alpha_value = 255 
    6160 
     
    116115 
    117116        box = OWGUI.widgetBox(self.settings_tab, 'Point properties') 
    118         OWGUI.hSlider(box, self, "plot.symbol_scale", label="Symbol scale", 
    119             minValue=1, maxValue=5, 
     117        ss = OWGUI.hSlider(box, self, "plot.symbol_scale", label="Symbol scale", 
     118            minValue=1, maxValue=20, 
    120119            tooltip="Scale symbol size", 
    121120            callback=self.on_checkbox_update, 
    122121            ) 
     122        ss.setValue(5) 
    123123 
    124124        OWGUI.hSlider(box, self, "plot.transparency", label="Transparency", 
     
    408408            S = self.data_array[:, self.size_attr - 1] 
    409409            if size_attr.varType == Discrete: 
    410                 sizes = [(v + 1) * len(size_attr.values) / (11 - self.symbol_scale) for v in S] 
     410                sizes = [v+1. for v in S] 
    411411            else: 
    412412                min, max = numpy.min(S), numpy.max(S) 
    413                 sizes = [(v - min) * self.symbol_scale / (max-min) for v in S] 
     413                sizes = [(v - min) / (max-min) for v in S] 
    414414        else: 
    415             sizes = 1 
     415            sizes = 1. 
    416416 
    417417        shapes = None 
  • orange/OrangeWidgets/plot/owplot3d.py

    r8557 r8558  
    10831083            colors = [color_map.get(colors, default) for _ in range(num_points)] 
    10841084  
    1085         if isinstance(sizes, int): 
     1085        if isinstance(sizes, (int, float)): 
    10861086            sizes = [sizes for _ in range(num_points)] 
    10871087 
     
    11211121            z *= scale_z 
    11221122            triangles = get_symbol_data(symbol) 
    1123             ss = size*0.08 
     1123            ss = size*0.02 
    11241124            ai += 1 
    11251125            for v0, v1, v2, n0, n1, n2 in triangles: 
Note: See TracChangeset for help on using the changeset viewer.