Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
GUI canvas-like drawing area?

Subject: GUI canvas-like drawing area?

From: MatlabUser

Date: 30 Oct, 2011 04:46:12

Message: 1 of 2

Hi, I'm an experienced Java/C++ programmer but am new to Matlab.

I've been tasked with writing a GUI application that displays a "speedometer"-style graphic where a needle moves back and forth depending on various voice frequencies.

Does the Matlab GUI framework have a general-purpose bitmap "canvas"-style drawing surface like in Java with a 2-D plotting area? I know Matlab has a plot() function, but I've only used them for plotting signals.

Subject: GUI canvas-like drawing area?

From: Yair Altman

Date: 22 Mar, 2012 07:43:12

Message: 2 of 2

"MatlabUser" wrote in message <j8ikqk$8g1$1@newscl01ah.mathworks.com>...
> Hi, I'm an experienced Java/C++ programmer but am new to Matlab.
>
> I've been tasked with writing a GUI application that displays a "speedometer"-style graphic where a needle moves back and forth depending on various voice frequencies.
>
> Does the Matlab GUI framework have a general-purpose bitmap "canvas"-style drawing surface like in Java with a 2-D plotting area? I know Matlab has a plot() function, but I've only used them for plotting signals.


Matlab does not have built-in gauge controls/plots. You would need to program it yourself. Since you're an experiences Java programmer, it may make sense for you to integrate one of the ready-made Java-based gauges, as described here:
http://undocumentedmatlab.com/blog/jfreechart-graphs-and-gauges/

Sven K├Ârner has posted several JFreeChart -based dial-plot utilities on the Matlab File Exchange - you can take one of his examples and adapt it for your specific needs:
http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A92825

Yair Altman
http://UndocumentedMatlab.com
Read my Matlab-Java programming book

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us