[1540] | 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 |
---|
| 11 | </DIV> |
---|
| 12 | <DIV CLASS="valimg"> |
---|
| 13 | Plotting a bar char plot with multiple sources |
---|
| 14 | <IMG WIDTH="100%" SRC="figs/bar_rain_CRU-NCEP_norm.png"></IMG> |
---|
| 15 | </DIV> |
---|
| 16 | <DIV CLASS="valhelp"> |
---|
| 17 | draw_bar(ncfile, values)<BR> |
---|
[1557] | 18 | ncfile = '#' list of [filen];[dimslice];[xvarn];[yvarn]<BR> |
---|
[1540] | 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 | [xvarn]: name of the variable to use for the x-positions<BR> |
---|
| 29 | [yvarn]: name of the variable to use for the values<BR> |
---|
| 30 | values = [dimxyfmt]:[xaxislab]:[yaxislab]:[xunits]:[yunits]:[aval]:[labels]:[colors]:[wdth]:[graphtit]:<BR> |
---|
| 31 | [legvalues]:[kindfig]:[fign]:[close]<BR> |
---|
| 32 | [dimxyfmt]=[dxs],[dxf],[Ndx],[ordx],[dys],[dyf],[Ndy],[ordy]: format of the values at each<BR> |
---|
| 33 | axis (or single 'auto' for 'auto','auto')<BR> |
---|
| 34 | [dxs]: style of x-axis ('auto' for 'pretty')<BR> |
---|
| 35 | 'Nfix', values computed at even 'Ndx'<BR> |
---|
| 36 | 'Stringlist', a given list of strings<BR> |
---|
| 37 | 'Vfix', values computed at even 'Ndx' increments<BR> |
---|
| 38 | 'pretty', values computed following aprox. 'Ndx' at 'pretty' intervals (2.,2.5,4,5,10)<BR> |
---|
| 39 | [dxf]: format of the labels at the x-axis<BR> |
---|
| 40 | [Ndx]: Number of ticks at the x-axis (for 'Stringlist', '@' list of labels)<BR> |
---|
| 41 | [ordx]: angle of orientation of ticks at the x-axis ('auto' for horizontal)<BR> |
---|
| 42 | [dys]: style of y-axis ('auto' for 'pretty')<BR> |
---|
| 43 | [dyf]: format of the labels at the y-axis<BR> |
---|
| 44 | [Ndy]: Number of ticks at the y-axis<BR> |
---|
| 45 | [ordy]: angle of orientation of ticks at the y-axis ('auto' for horizontal)<BR> |
---|
| 46 | [xaxislab]: Label for the x-axis ('!' for spaces)<BR> |
---|
| 47 | [yaxislab]: Label for the y-axis ('!' for spaces)<BR> |
---|
| 48 | [xunits]: units of the x-label ('None' for no units)<BR> |
---|
| 49 | [yunits]: units of the y-label<BR> |
---|
| 50 | [aval]: which acis should be used for the values ('x' or 'y')<BR> |
---|
| 51 | [labels]: ',' list of labels for the legend ('None' for no-labels)<BR> |
---|
| 52 | [colors]: ',' list of colors (single value same color, 'auto' automatic)<BR> |
---|
| 53 | [wdth]: width of the bars<BR> |
---|
| 54 | [graphtit]: title of the figure '!' for spaces<BR> |
---|
| 55 | [legvalues]=[locleg]|[fontsize]: <BR> |
---|
| 56 | [locleg]: location of the legend (0, autmoatic)<BR> |
---|
| 57 | 1: 'upper right', 2: 'upper left', 3: 'lower left', 4: 'lower right',<BR> |
---|
| 58 | 5: 'right', 6: 'center left', 7: 'center right', 8: 'lower center',<BR> |
---|
| 59 | 9: 'upper center', 10: 'center'<BR> |
---|
| 60 | [fontsize]: font size for the legend (auto for 12)<BR> |
---|
| 61 | [kindfig]: kind of output figure (png, pdf, ps)<BR> |
---|
| 62 | [fign]: name of the figure (without extension)<BR> |
---|
| 63 | [close]: whether figure should be close or not<BR> |
---|
| 64 | </DIV> |
---|
| 65 | <DIV CLASS="valins"> |
---|
[1557] | 66 | $ python ${pyHOME}/drawing.py -o draw_bar -f 'Forcing_rainstats_OKstomate_CRUNCEP_spinup_SESA_norm_meanstd_stat2.nc;time_counter,0@12@1;time_counter;rainnorm#Forcing_rainstats_OKstomate_CRUNCEP_spinup_SACZ_norm_meanstd_stat2.nc;time_counter,0@12@1;time_counter;rainnorm' -S 'Stringlist,%s,January@Feburary@March@Arpil@May@June@July@August@September@October@November@December,25,pretty,auto,auto,auto:time!since!1958-01-01:pr:y:seconds:mmd-1:SESA,SACZ:#AA0000,#0000AA:1000000.:normalized!evolution!of!precipitaion!with!CRU-NCEP!forcing:0|10:png:bar_rain_CRU-NCEP_norm:yes' |
---|
[1540] | 67 | </DIV> |
---|
| 68 | </BODY> |
---|
| 69 | </HTML> |
---|
| 70 | |
---|