This page is optimized for mobile devices, if you would prefer the desktop version just click here

Java1468-plotting engineering and scientific data using java  (Page 2/25)

A generalized plotting program

This module develops a generalized plotting program, which is easy to connect to other programs, (whether they are simple or complex) , in order to display the output from those programs in two-dimensional Cartesian coordinates .. The plotting program is specifically designed to be useful to persons having very little knowledge of Java programming.

(Actually, the module develops two very similar plotting programs each designed to display the data in a different format.)

Viewing tip

I recommend that you open another copy of this module in a separate browser window and use the following links to easily find and view the Figuresand Listings while you are reading about them.

Figures

  • Figure 1 . Sample Display.
  • Figure 2 . Sample Display for Same Data with Different Plotting Parameters.
  • Figure 3 . A Digital Signal Processing (DSP) Example.
  • Figure 4 . Graphic Display for Self-Test Class.
  • Figure 5 . Sample output format from Graph02.

Listings

Preview

Figure 1 shows a typical display produced by one of the plotting programs that I will develop in this module. (The other program superimposes all of the curves on the same set of axes instead of spacing them vertically as shownin Figure 1 .)

Figure 1. Sample Display.

While the plotting program itself is quite complex, the code required to produce the data to be plotted can be very simple. For example, because of theuse of the Java Math library, only fourteen lines of simple Java code were required to produce the data plotted in Figure 1 .

<< Chapter < Page Page > Chapter >>

Read also:

OpenStax, Digital signal processing - dsp. OpenStax CNX. Jan 06, 2016 Download for free at https://legacy.cnx.org/content/col11642/1.38
Google Play and the Google Play logo are trademarks of Google Inc.
Jobilize.com uses cookies to ensure that you get the best experience. By continuing to use Jobilize.com web-site, you agree to the Terms of Use and Privacy Policy.