### Table of Contents

# Plot styles by example

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

The base SCaVis 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") c1.visible() c1.setRange(0,100,0,100) h1 = H1D("Histogram",20, 50.0, 100.0) f1=F1D("cos(x)*x",1,50) p1= P1D("X-Y data") rand = Random(10) for i in range(500): h1.fill(85+10*rand.nextGaussian()) if (i<200): p1.add(56+7*rand.nextGaussian(),70+7*rand.nextGaussian()) c1.draw(f1) c1.draw(h1) c1.draw(p1)

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.

## Presentation styles

Here are “presentation” styles: plots are colourful and look attractive.

Here is a double plot with linear and log scale. We use `jhplot.HPlot`

after rescaling the canvas sizes. Errors are shown as shaded band.

Here is another double plot with linear and log scale. We use `jhplot.HPlotJa`

which is the most flexible. Errors are shown as shaded band.