line plots. what is a good line plot? clear clean hightlight the key lines: thick

12
Line plots

Upload: merryl-wiggins

Post on 18-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Line plots. What is a good line plot? Clear Clean Hightlight the key lines: thick

Line plots

Page 2: Line plots. What is a good line plot? Clear Clean Hightlight the key lines: thick

What is a good line plot?

• Clear• Clean• Hightlight the key lines: thick

Page 3: Line plots. What is a good line plot? Clear Clean Hightlight the key lines: thick

Example: Global mean surface temperature

Page 4: Line plots. What is a good line plot? Clear Clean Hightlight the key lines: thick

Don’t be mislead by the aspect ratio

Page 5: Line plots. What is a good line plot? Clear Clean Hightlight the key lines: thick

Line plots — Plot • Syntax: plot, x, y plot, y (the data points are plotted against

corresponding array indices) plot, x, y, max=dmax, min=dmin (limit the

maximum and minimum data values to be plotted)

• Overplotting oplot, x, y• Scatter plots plot, x, y, psym=symbol_code

Page 6: Line plots. What is a good line plot? Clear Clean Hightlight the key lines: thick

Line plot customization• Keywords

General: title, charsize, charthick

For data lines: linestyle, thick, psym, symsize, color,

/nodata, /noerase, /noclip

For axis: /ynozero, /xlog, /ylog,

[xyz]title, range, style, thick

[xyz]ticks, tickv, tickname, ticklen

Page 7: Line plots. What is a good line plot? Clear Clean Hightlight the key lines: thick

Examplex=findgen(10)y=x^2.0

plot, x, y, charsize=2.0, $ title=‘Google stock’, xtitle=‘Time (month)’,

ytitle=‘Dollar’, $ thick=4, $ xrange=[0, 9], xstyle=1, yrange=[0, 85], ystyle=1, $ xticklen=0.01,yticklen=0.01, $ xticks=9, yticks=4, $ ytickv=[0,10,20,40,60],

ytickname=[‘0’,’10’,’20’,’40’,’60’]

Page 8: Line plots. What is a good line plot? Clear Clean Hightlight the key lines: thick

Plot: Omitting default axes

• Plot, x, y, xstyle=4 (or 8), ystyle=4 (or 8)

Page 9: Line plots. What is a good line plot? Clear Clean Hightlight the key lines: thick

Line plots: Logarithm and bar plots

• Logarithm: Plot, x, y, /xlog, /ylog

• Bar plot: bar_plot, data, barnames=bn

Page 10: Line plots. What is a good line plot? Clear Clean Hightlight the key lines: thick

Find the longitude/latitude index for a specified position

Lon=findgen(144)*2.5Lon1= 277.0 ; Columbus Ohiox=abs(lon1-lon)Index=where(x eq min(x))i=index(0)Print, i, lon(i), lon1

Lat=findgen(73)*2.5-90.0Lat1= 40.0 ; Columbus OhioX=abs(lat1-lat)Index=where(x eq min(x))j=index(0)Print, j, lat(j), lat1

Page 11: Line plots. What is a good line plot? Clear Clean Hightlight the key lines: thick

Assignment VIMake your plots for Assignment III as good as possible (thick lines, big charsize, correct xrange/yrange, short tick length, emphasize with symbols, omit some axes, …)

1. Read and plot the population history of Columbus, OH http://www.biggestuscities.com/city/columbus-ohio and the population history of 5 other cities of your interest. Please omit the top, bottom and right axes.

2. Please go to http://www.esrl.noaa.gov/psd/data/climateindices/list/ Read and plot any four of the climate indices (e.g. the last four: Global Mean Lan/Ocean Temperature, Solar Flux, Northeast Brazil Rainfall Anomaly, SW Monsoon Region rainfall). Please emphasize the data points using some symbols.

Page 12: Line plots. What is a good line plot? Clear Clean Hightlight the key lines: thick

Assignment VI (cont.)

3. Please go to University of Wyoming sounding data site: http://weather.uwyo.edu/upperair/sounding.html Click on one station of your interest. Read and plot the profile of temperature (temp) versus pressure for the sounding. The range for pressure should be [1000, 100]. Please make two plots with one using ordinary pressure coordinate, and the other using logarithm for the pressure coordinate.

4. Go to: http://lightning.sbs.ohio-state.edu/geog8901/data/ Read the netCDF file ncep_skt.mon.ltm.nc for global surface skin temperature (skt) climatology (mean values for each of the 12 months). Find the longitude/latitude index for 6 different cities (one each for North America, South America, Asia, Europe, Africa and Antarctica). Make a 6 panel plot of the skt change throughout the year for each city.