[1549] | 1 | <HTML> |
---|
| 2 | <HEAD> |
---|
| 3 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8"/> |
---|
| 4 | <LINK REL="stylesheet" TYPE="text/css" HREF="../PyNCplot.css"/> |
---|
| 5 | </HEAD> |
---|
| 6 | |
---|
| 7 | </HEAD> |
---|
| 8 | <BODY> |
---|
| 9 | <DIV CLASS="valheader"> |
---|
| 10 | bar line time plot |
---|
| 11 | </DIV> |
---|
| 12 | <DIV CLASS="valimg"> |
---|
| 13 | Function to plot a bar char and lines plot figure with multiple sources and time-axis |
---|
[1550] | 14 | <IMG WIDTH="100%" SRC="figs/bar_time_rain-evap_DJFmean_norm.png"></IMG> |
---|
[1549] | 15 | </DIV> |
---|
| 16 | <DIV CLASS="valhelp"> |
---|
| 17 | draw_bar_line_time(ncfile, values)<BR> |
---|
[1557] | 18 | ncfile = '#' list of [filen];[dimslice];[xvarn];[yvarn];[kind]<BR> |
---|
[1549] | 19 | [filen]: name of the file<BR> |
---|
| 20 | [dimslice]: '|' list of [dimn],[dimrange]<BR> |
---|
| 21 | [dimn]: name of the dimension<BR> |
---|
| 22 | [dimrange]: range for the slice<BR> |
---|
| 23 | * [integer]: which value of the dimension<BR> |
---|
| 24 | * -1: all along the dimension<BR> |
---|
| 25 | * -9: last value of the dimension<BR> |
---|
| 26 | * [beg]@[end]@[inc] slice from [beg] to [end] every [inc]<BR> |
---|
| 27 | * NOTE, no dim name all the dimension size<BR> |
---|
| 28 | [tvarn]: name of the variable time<BR> |
---|
| 29 | [yvarn]: name of the variable to use for the values<BR> |
---|
| 30 | [kind]: Kind of plotting<BR> |
---|
| 31 | 'bar': for bar-plot<BR> |
---|
| 32 | 'line': for line-plot<BR> |
---|
| 33 | values = [dimxyfmt];[yaxislab];[yunits];[aval];[rangevals];[timevals];[labels];<BR> |
---|
| 34 | [colors];[wdth];[colns];[lines];[points];[lwdths];[psizes];[freqv];[graphtit];[legvalues];<BR> |
---|
| 35 | [kindfig];[fign];[close]<BR> |
---|
| 36 | [dimxyfmt]=[dxs],[dxf],[Ndx],[ordx],[dys],[dyf],[Ndy],[ordy]: format of the values at each <BR> |
---|
| 37 | axis (or single 'auto' for 'auto','auto')<BR> |
---|
| 38 | [dxs]: style of x-axis ('auto' for 'pretty')<BR> |
---|
| 39 | 'Nfix', values computed at even 'Ndx'<BR> |
---|
| 40 | 'Stringlist', a given list of strings<BR> |
---|
| 41 | 'Vfix', values computed at even 'Ndx' increments<BR> |
---|
| 42 | 'pretty', values computed following aprox. 'Ndx' at 'pretty' intervals (2.,2.5,4,5,10)<BR> |
---|
| 43 | [dxf]: format of the labels at the x-axis<BR> |
---|
| 44 | [Ndx]: Number of ticks at the x-axis (for 'Stringlist', '@' list of labels)<BR> |
---|
| 45 | [ordx]: angle of orientation of ticks at the x-axis ('auto' for horizontal)<BR> |
---|
| 46 | [dys]: style of y-axis ('auto' for 'pretty')<BR> |
---|
| 47 | [dyf]: format of the labels at the y-axis<BR> |
---|
| 48 | [Ndy]: Number of ticks at the y-axis<BR> |
---|
| 49 | [ordy]: angle of orientation of ticks at the y-axis ('auto' for horizontal)<BR> |
---|
| 50 | [yaxislab]: Label for the y-axis ('!' for spaces)<BR> |
---|
| 51 | [yunits]: units of the y-label<BR> |
---|
| 52 | [aval]: which acis should be used for the values ('x' or 'y')<BR> |
---|
| 53 | [rangevals]: Range of the axis with the values (singel 'None' for 'auto','auto')<BR> |
---|
| 54 | [vmin],[vmax]: minimum and maximum values<BR> |
---|
| 55 | 'auto': the computed minimumm or maximum of the values <BR> |
---|
| 56 | [timevals]: [timen]|[units]|[kind]|[tfmt] time labels characteristics<BR> |
---|
| 57 | [timen]; name of the time variable<BR> |
---|
| 58 | [units]; units string according to CF conventions ([tunits] since <BR> |
---|
| 59 | [YYYY]-[MM]-[DD] [[HH]:[MI]:[SS]], '!' for spaces)<BR> |
---|
| 60 | [kind]; kind of output<BR> |
---|
| 61 | 'Nval': according to a given number of values as 'Nval',[Nval]<BR> |
---|
| 62 | 'exct': according to an exact time unit as 'exct',[tunit]; <BR> |
---|
| 63 | tunit= [Nunits],[tu]; [tu]= 'c': centuries, 'y': year, 'm': month,<BR> |
---|
| 64 | 'w': week, 'd': day, 'h': hour, 'i': minute, 's': second, <BR> |
---|
| 65 | 'l': milisecond<BR> |
---|
| 66 | [tfmt]; desired format<BR> |
---|
| 67 | [labels]: ',' list of labels for the legend ('None' for no-labels, '!' for spaces)<BR> |
---|
| 68 | [colors]: ',' list of colors (single value same color, 'auto' automatic)<BR> |
---|
| 69 | [wdth]: width of the bars<BR> |
---|
| 70 | [colns]= ',' list of color names ('None' for automatic, single value for all the same)<BR> |
---|
| 71 | [lines]= ',' list of style of lines ('None' for automatic, single value for all the same)<BR> |
---|
| 72 | [points]= '@' list of style of points ('None' for automatic, single value for all the same)<BR> |
---|
| 73 | [lwdths]= ',' list of withs of lines ('None' for automatic, single value for all the same)<BR> |
---|
| 74 | [psizes]= ',' list of size of points ('None' for automatic, single value for all the same)<BR> |
---|
| 75 | [freqv]= frequency of values ('all' for all values)<BR> |
---|
| 76 | [graphtit]: title of the figure '!' for spaces<BR> |
---|
| 77 | [legvalues]=[locleg]|[fontsize]: <BR> |
---|
| 78 | [locleg]: location of the legend (0, autmoatic)<BR> |
---|
| 79 | 1: 'upper right', 2: 'upper left', 3: 'lower left', 4: 'lower right',<BR> |
---|
| 80 | 5: 'right', 6: 'center left', 7: 'center right', 8: 'lower center',<BR> |
---|
| 81 | 9: 'upper center', 10: 'center'<BR> |
---|
| 82 | [fontsize]: font size for the legend (auto for 12)<BR> |
---|
| 83 | [kindfig]: kind of output figure (png, pdf, ps)<BR> |
---|
| 84 | [fign]: name of the figure (without extension)<BR> |
---|
| 85 | [close]: whether figure should be close or not<BR> |
---|
| 86 | </DIV> |
---|
| 87 | <DIV CLASS="valins"> |
---|
[1557] | 88 | $ python ${pyHOME}/drawing.py -o draw_bar_line_time -f 'Forcing_rainstats_OKstomate_SESA_DJFmean_norm_meanstd_stat2.nc;time_centered,-1;time_centered;rainnorm;bar#Forcing_rainstats_OKstomate_SACZ_DJFmean_norm_meanstd_stat2.nc;time_centered,-1;time_centered;rainnorm;bar#DiPolo_evapstats_OKstomate_SESA_DJFmean_stat2.nc;time_centered,-1;time_centered;evap_stats;line#DiPolo_evapnustats_OKstomate_SESA_DJFmean_stat2.nc;time_centered,-1;time_centered;evapnu_stats;line#DiPolo_evspsblvegstats_OKstomate_SESA_DJFmean_stat2.nc;time_centered,-1;time_centered;evspsblveg_stats;line#DiPolo_transpirstats_OKstomate_SESA_DJFmean_stat2.nc;time_centered,-1;time_centered;transpir_stats;line#DiPolo_evapstats_OKstomate_SACZ_DJFmean_stat2.nc;time_centered,-1;time_centered;evap_stats;line#DiPolo_evapnustats_OKstomate_SACZ_DJFmean_stat2.nc;time_centered,-1;time_centered;evapnu_stats;line#DiPolo_evspsblvegstats_OKstomate_SACZ_DJFmean_stat2.nc;time_centered,-1;time_centered;evspsblveg_stats;line#DiPolo_transpirstats_OKstomate_SACZ_DJFmean_stat2.nc;time_centered,-1;time_centered;transpir_stats;line' -S 'auto;pr;y;None;1;year|seconds!since!1958-01-01!00:00:00|exct,5,y|%Y;SESA,SACZ,SESA!evap,evapnu,evspblveg,transpir,SACZ!evap,None,None,None;#AA0000,#0000AA;10000000.;#AAAA00,#00AAAA,#AA00AA,#AAAAAA,#AAAA00,#00AAAA,#AA00AA,#AAAAAA;-,-,-,-,--,--,--,--;,;2.;2.;all;normalized!evolution!of!DJFmean!with!WFD3!forcing;0|10;png;bar_time_rain_CRU-NCEP_DJFmean_norm;yes' |
---|
[1549] | 89 | </DIV> |
---|
| 90 | </BODY> |
---|
| 91 | </HTML> |
---|
| 92 | |
---|