should teach both analysing the data and presentation, with code examples, preferably Java or Ruby.
Yeah! Ben Fry's book, Visualizing Data: Exploring and Explaining Data with the Processing Environment. It uses the Processing programming language, which is about 6 inches from Java, and much quicker to get productive in for graphics-intensive stuff.
Although it's not a programming book, I would strongly recommend Edward Tufte's classic Visual Display of Quantitative Information, which discusses practises surrounding the effective display of numerical information. I would recommend reading it (and his other works) alongside anything programming-related.
The classic book on statistical graphics, charts, tables. Theory and practice in the design of data graphics, 250 illustrations of the best (and a few of the worst) statistical graphics, with detailed analysis of how to display data for precise, effective, quick analysis. Design of the high-resolution displays, small multiples. Editing and improving graphics. The data-ink ratio. Time-series, relational graphics, data maps, multivariate designs. Detection of graphical deception: design variation vs. data variation. Sources of deception. Aesthetics and data graphical displays.