Presentation is loading. Please wait.

Presentation is loading. Please wait.

Libraries Code put together for others to use. Usually in the form of jar files. May contain native dynamically linked libraries (dll) and others, but.

Similar presentations


Presentation on theme: "Libraries Code put together for others to use. Usually in the form of jar files. May contain native dynamically linked libraries (dll) and others, but."— Presentation transcript:

1 Libraries Code put together for others to use. Usually in the form of jar files. May contain native dynamically linked libraries (dll) and others, but more usually just jar files. Consult notes, as dlls etc. sometimes needed, but more usually these are libraries for other languages.

2 Managing Libraries Download the library.
Make sure it is in your CLASSPATH when compiling and running. java -classpath ".;c:\libraries\lib.jar" YourClass [any problems, see ] Alternatively, you can use a class management system.

3 Eclipse

4 Build automation tools
GNU Make: Old UNIX system for installing complex programs on UNIX. Not pleasant to use. Apache Maven: XML based. Downloads required libraries. Organises compilation and creation of jar files. Demands a specific project structure. Eclipse : File → New → Project → Maven Apache Ant: XML version of Make. More flexible / harder to get a grip on.

5 Libraries Graphing Geographical data Processing

6 Graphing JFreeChart

7 Setting up a Graph Set up a dataset. JFreeChart chart = ChartFactory.createXChart(dataset); XPlot plot = (XPlot) chart.getPlot(); Adjust form, colour, etc. of plot if necessary. ChartPanel chartPanel = new ChartPanel(chart); Add chartPanel to Frame or similar

8 Example DefaultPieDataset data = new DefaultPieDataset(); data.setValue("Cherry", 30); data.setValue("Steak and Kidney", 25); data.setValue("Stargazy", 45); JFreeChart chart = ChartFactory.createPieChart3D ("Favourite Pies", data, true, true, false); PiePlot3D plot = (PiePlot3D) chart.getPlot(); plot.setForegroundAlpha(0.5f); ChartPanel chartPanel = new ChartPanel(chart);

9

10 Other graphing packages
InfoVis (Javascript + JSON) D3 (DOM styling) Raphael

11 Python Pandas (python) MPLD3 Bokeh


Download ppt "Libraries Code put together for others to use. Usually in the form of jar files. May contain native dynamically linked libraries (dll) and others, but."

Similar presentations


Ads by Google