Be the first to rate this file! 23 Downloads (last 30 days) File Size: 71 KB File ID: #30439
image thumbnail

Dialplot Demo 4, Multiple needle

by

 

Dialplot Demo with multiple needles. Uses JFreeChart and MAtlab.

| Watch this File

File Information
Description

Dialdemo alá JFreeGraph-Demo

The code behind is just a demo of what is possible with JFreeChart using it in Matlab. I played a little
with codesnippets I found on the web and the API-Documentation.
(http://www.jfree.org/jfreechart/api/javadoc/index.html). When you want to explore the whole functionality,
I think it is better to buy the JFreeChart Developer Guide (http://www.jfree.org/jfreechart/devguide.html).

This function shows a Dial as an example of JFreeChart (http://www.jfree.org/). The Idea
to this code is based on the UndocumentedMatlab-Blog of Yair Altman, who shows a sample Code of JFreeChart
for creating a PieChart (http://undocumentedmatlab.com/blog/jfreechart-graphs-and-gauges/#comments)

Within the plot you can modify the values for the needles by using the sliders.

Before this demo works, you need to download JFreeChart and make matlab get to know with it. There are 2
ways you can do this:

1. Add the jcommon and jfreechart jar to the dynamic matlab JavaClassPath (uncommented lines in the first
   cell an change path to your local installation path)
2. Add the jcommon and jfreechart jar to the static matlab JavaClassPath (see Matlab Help, modify
   classpath.txt on matlabroot\toolbox\local)

Finally you must donwload jcontrol from Malcom Lidierth
(http://www.mathworks.com/matlabcentral/fileexchange/15580-using-java-swing-components-in-matlab).

Bugs and suggestions:
   Please send to Sven Koerner: koerner(underline)sven(add)gmx.de

You need to download and install first:
   http://sourceforge.net/projects/jfreechart/files/1.%20JFreeChart/1.0.13/
   http://sourceforge.net/projects/jfreechart/files/1.%20JFreeChart/1.0.9/
   http://www.mathworks.com/matlabcentral/fileexchange/15580-using-java-swing-components-in-matlab

Acknowledgements

Using Java Swing Components In Matlab inspired this file.

MATLAB release MATLAB 7.10 (R2010a)
Other requirements http://sourceforge.net/projects/jfreechart/files/1.%20JFreeChart/1.0.13/ http://sourceforge.net/projects/jfreechart/files/1.%20JFreeChart/1.0.9/ http://www.mathworks.com/matlabcentral/fileexchange/15580-using-java-swing-components-in-matlab
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
24 May 2012 Sven Koerner

Of course it is possible to generate more than one Dialplot-object. You can control it with the jcontrol-line. Therefore you need to create a second Dialplot and than arrange it with jcontrol.

21 May 2012 Matthew

Works beautifully, but I can't seem to be able to create more than one DialPlot object. Repeated calls to the constructor just return the original reference. Any advice?

Contact us