Changeset 7e0f9b5 in sasview for src/sas/plottools/PlotPanel.py


Ignore:
Timestamp:
Apr 23, 2015 8:46:59 AM (9 years ago)
Author:
Ricardo M. Ferraz Leal <ricleal@…>
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:
373d4ee, aa352c8
Parents:
201b960
Message:

String containing only "$$" was crashing the panel display.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/plottools/PlotPanel.py

    r201b960 r7e0f9b5  
    12261226 
    12271227        # Properties defined by plot 
    1228         matplotlib.rc('text', usetex=True) 
    1229         self.subplot.set_xlabel(r"$%s$"%prop["xlabel"]) 
    1230         self.subplot.set_ylabel(r"$%s$"%prop["ylabel"]) 
     1228         
     1229        # Ricardo: 
     1230        # A empty label "$$" will prevent the panel from displaying!  
     1231         
     1232        if prop["xlabel"]: 
     1233            self.subplot.set_xlabel(r"$%s$"%prop["xlabel"]) 
     1234        if prop["ylabel"]: 
     1235            self.subplot.set_ylabel(r"$%s$"%prop["ylabel"]) 
    12311236        self.subplot.set_title(prop["title"]) 
     1237         
    12321238 
    12331239    def clear(self): 
Note: See TracChangeset for help on using the changeset viewer.