DMelt:Plots/9 Plot Styles by Example

From HandWiki
Limitted access. First login to DataMelt if you are a full DataMelt member. Then login to HandWiki as a user.

Plot styles by example

This tutorial shows various styles of presenting data when using DataMelt. As usual, we make a small Jython code snippets to illustrate various Canvas styles.

The base DataMelt code which makes data for the examples below is the same. It looks as:

from java.util import Random
from jhplot import * 

c1 =HPlot("Canvas")

h1 = H1D("Histogram",20, 50.0, 100.0)
p1= P1D("X-Y data")

rand = Random(10)
for i in range(500):
      if (i<200): p1.add(56+7*rand.nextGaussian(),70+7*rand.nextGaussian())

Below we show how to apply various graphic styles when presenting these 3 objects: a histogram, a function and data points.

Article styles

Here are "scientific" styles: plots are all in black and while, nothing fancy.

DMelt example: Style for 2D. Plain article style (BG color)

The code is shown below:

Presentation styles

Now we consider alternative styles that use a lot of colors:

DMelt example: Presentation style for 2D plots (colors)

The code is shown below:

You can put LateX equations too:

DMelt example: Presentation style with logo and LaTeX equation

The code is shown below:

Or you can change background:

DMelt example: Presentation style with many colors and insert image

The code is shown below: