Changeset f80236f in sasview


Ignore:
Timestamp:
Jan 12, 2012 9:10:18 AM (12 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
6f140f2
Parents:
3a6c3b9
Message:

added tickmarker size changing with ticklabel size

Location:
plottools/src/danse/common/plottools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • plottools/src/danse/common/plottools/PlotPanel.py

    r26b0a7c rf80236f  
    258258        self.xaxis_unit = None 
    259259        self.xaxis_color = 'black' 
    260         self.xaxis_tick = False 
     260        self.xaxis_tick = None 
    261261        self.yaxis_font = None 
    262262        self.yaxis_label = None 
    263263        self.yaxis_unit = None 
    264264        self.yaxis_color = 'black' 
    265         self.yaxis_tick = False 
     265        self.yaxis_tick = None 
    266266         
    267267        # check if zoomed. 
     
    10611061        """ 
    10621062        xaxis_label, xaxis_unit, xaxis_font, xaxis_color,\ 
    1063                      is_ok, xaxis_tick = self._on_axis_label(axis='x') 
     1063                     is_ok, is_tick = self._on_axis_label(axis='x') 
    10641064        if not is_ok: 
    10651065            return 
     
    10691069        self.xaxis_font = xaxis_font 
    10701070        self.xaxis_color = xaxis_color 
    1071         self.xaxis_tick = xaxis_tick 
     1071        if is_tick: 
     1072            self.xaxis_tick = xaxis_font 
    10721073         
    10731074        if self.data != None: 
     
    11001101        """ 
    11011102        yaxis_label, yaxis_unit, yaxis_font, yaxis_color,\ 
    1102                         is_ok, yaxis_tick = self._on_axis_label(axis='y') 
     1103                        is_ok, is_tick = self._on_axis_label(axis='y') 
    11031104        if not is_ok: 
    11041105            return 
    1105          
     1106 
    11061107        self.yaxis_label = yaxis_label 
    11071108        self.yaxis_unit = yaxis_unit 
    11081109        self.yaxis_font = yaxis_font 
    11091110        self.yaxis_color = yaxis_color 
    1110         self.yaxis_tick = yaxis_tick 
     1111        if is_tick: 
     1112            self.yaxis_tick = yaxis_font 
    11111113 
    11121114        if self.data != None: 
     
    12551257                                handletextsep=.05, loc=self.legendLoc) 
    12561258                  
    1257     def xaxis(self, label, units, font=None, color='black', t_font=False): 
     1259    def xaxis(self, label, units, font=None, color='black', t_font=None): 
    12581260        """xaxis label and units. 
    12591261         
     
    12711273        if font: 
    12721274            self.subplot.set_xlabel(label, fontproperties=font, color=color) 
    1273             if t_font: 
     1275            if t_font != None: 
    12741276                for tick in self.subplot.xaxis.get_major_ticks(): 
    1275                     tick.label.set_fontproperties(font)  
     1277                    tick.label.set_fontproperties(t_font)  
     1278                for line in self.subplot.xaxis.get_ticklines(): 
     1279                    size = t_font.get_size() 
     1280                    line.set_markersize(size / 3) 
     1281                    #line.set_markeredgewidth(int(size / 24 + 1)) 
    12761282        else: 
    12771283            self.subplot.set_xlabel(label, color=color) 
    12781284        pass 
    12791285     
    1280     def yaxis(self, label, units, font=None, color='black', t_font=False): 
     1286    def yaxis(self, label, units, font=None, color='black', t_font=None): 
    12811287        """yaxis label and units.""" 
    12821288        if units != "":  
     
    12861292        if font: 
    12871293            self.subplot.set_ylabel(label, fontproperties=font, color=color) 
    1288             if t_font: 
     1294            if t_font != None: 
    12891295                for tick_label in self.subplot.get_yticklabels(): 
    1290                     tick_label.set_fontproperties(font) 
     1296                    tick_label.set_fontproperties(t_font) 
     1297                for line in self.subplot.yaxis.get_ticklines(): 
     1298                    size = t_font.get_size() 
     1299                    line.set_markersize(size / 3) 
    12911300        else: 
    12921301            self.subplot.set_ylabel(label, color=color) 
  • plottools/src/danse/common/plottools/TextDialog.py

    r26b0a7c rf80236f  
    2424        self.SetWindowVariant(variant=FONT_VARIANT) 
    2525        # default 
    26         self.family = FAMILY[0] 
     26        self.family = FAMILY[1] 
    2727        self.size = SIZE[3] 
    2828        self.style = STYLE[0] 
    2929        self.weight = WEIGHT[1] 
    3030        self.color = COLOR[0] 
    31         self.tick_label = True 
     31        self.tick_label = False 
    3232        #Dialog interface 
    3333        vbox  = wx.BoxSizer(wx.VERTICAL) 
     
    5454            self.tick_label_check = wx.CheckBox(self, -1,  
    5555                                                '', (10, 10)) 
    56             self.tick_label_check.SetValue(True) 
     56            self.tick_label_check.SetValue(False) 
    5757            self.tick_label_check.SetToolTipString("Apply to tick label too.") 
    5858            wx.EVT_CHECKBOX(self, self.tick_label_check.GetId(),  
     
    8282        self.fontFamily.SetMinSize((_BOX_WIDTH, -1)) 
    8383        self._set_family_list() 
    84         self.fontFamily.SetSelection(0) 
     84        self.fontFamily.SetSelection(1) 
    8585        self.fontFamily.SetToolTipString("Font family of the text.") 
    8686        #font weight 
Note: See TracChangeset for help on using the changeset viewer.