Changeset 687 in lmdz_wrf for trunk/tools/drawing.py
- Timestamp:
- Jan 28, 2016, 1:38:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/drawing.py
r684 r687 1813 1813 ncfilens= [filen] ',' separated list of netCDF files 1814 1814 values= [dimvname];[valuesaxis];[dimtit];[leglabels];[vtit];[title];[timevals];[locleg]; 1815 [graphk];[collines];[points];[ pointfreq];[period]1815 [graphk];[collines];[points];[linewidths];[pointsizes];[pointfreq];[period] 1816 1816 [dimvname]: ',' list of names of the variables with he values of the common dimension 1817 1817 [valuesaxis]: which axis will be used for the values ('x', or 'y') … … 1841 1841 [points]: ',' list of type of points for the lines, None for automatic, single 1842 1842 value all the same 1843 [linewidths]: ',' list of widths for the lines, None for automatic, single 1844 value all the same 1845 [pointsizes]: ',' list of widths for the lines, None for automatic, single 1846 value all the same 1843 1847 [pointfreq]: frequency of point plotting, 'all' for all time steps 1844 1848 [period]: which period to plot … … 1858 1862 expectargs = '[dimvname];[valuesaxis];[dimtit];[leglabels];[vtit];[title];' 1859 1863 expectargs = expectargs + '[timevals];[locleg];[graphk];[lines];[collines];[points];' 1860 expectargs = expectargs + '[ pointfreq];[period]'1864 expectargs = expectargs + '[linewidths];[pointsizes];[pointfreq];[period]' 1861 1865 drw.check_arguments(fname,len(expectargs.split(';')),values,';',expectargs) 1862 1866 … … 1874 1878 collines0 = values.split(';')[10] 1875 1879 points0 = values.split(';')[11] 1876 pointfreq0 = values.split(';')[12] 1877 period = values.split(';')[13] 1880 linewidths0 = values.split(';')[12] 1881 pointsizes0 = values.split(';')[13] 1882 pointfreq0 = values.split(';')[14] 1883 period = values.split(';')[15] 1878 1884 1879 1885 Nfiles = len(ncfiles) … … 1904 1910 if collines0.find(',') != -1: 1905 1911 collines = collines0.split(',') 1906 elif collines == 'None':1912 elif collines0 == 'None': 1907 1913 collines = None 1908 1914 else: … … 1920 1926 for ip in range(Nfiles): 1921 1927 points.append(points0) 1928 1929 # Multiple line sizes? 1930 if linewidths0.find(',') != -1: 1931 linewidths = [] 1932 Nlines = len(linewidths0.split(',')) 1933 for il in Nlines: 1934 linewidths.append(np.float(linewidths0.split(',')[il])) 1935 elif linewidths0 == 'None': 1936 linewidths = None 1937 else: 1938 linewidths = [np.float(linewidths0)] 1939 1940 # Multiple point sizes? 1941 if pointsizes0.find(',') != -1: 1942 pointsizes = [] 1943 Npts = len(pointsizes0.split(',')) 1944 for ip in Npts: 1945 pointsizes.append(np.float(pointsizes0.split(',')[ip])) 1946 elif pointsizes0 == 'None': 1947 pointsizes = None 1948 else: 1949 pointsizes = [np.float(pointsizes0)] 1922 1950 1923 1951 # Getting values … … 2062 2090 drw.plot_lines_time(dimvalues, varvalues, valuesaxis, dimtit, legvals, vartit, \ 2063 2091 varunits, timepos, timelabels, title, locleg, graphk, lines, collines, points, \ 2064 pointfreq)2092 linewidths, pointsizes, pointfreq) 2065 2093 2066 2094 return
Note: See TracChangeset
for help on using the changeset viewer.