PLOT AXISLABELS, ORANGE LINE SELECT year, avg FROM cpi_annual; |
|
PLOT [optional_chart_type] chart_series_type [, ...] [WITH] [SCALE (axis) {(min) (max) (incr) | LOG | LOG10 }] [ZEROBASED] [[NO] CLIP] [[HORIZONTAL | VERTICAL] GRIDLINES] [TITLE [LEFT | RIGHT | CENTER] "string"] ... [TITLE (axis) "string"] [NOTE [LEFT | RIGHT | CENTER] "string"] ... [COMMENT [LEFT | RIGHT | CENTER] "string"] ... [FORMAT (axis) {AUTO | PLAIN | SCIENTIFIC | DECIMAL "(decimal format)" | "date_time_format"] [LABELANGLE {0 | 90}] [[color] [line_type] [HORIZONTAL | VERTICAL] GRIDLINES] [FONT font_family font_style font_size] [TITLEFONT font_family font_style font_size] [FOREGROUND color] [BACKGROUND color] [FRAMECOLOR color] [[NO] SIDES] [[NO] COLLAR] [[NO] YAXIS] [[NO] XAXIS] [[NO] X2AXIS] [[NO] Y2AXIS] [[NO] LABELS (axis) [ON {TOP | BOTTOM | LEFT | RIGHT}] [[NO] TICKS (axis) [ON {TOP | BOTTOM | LEFT | RIGHT}] [[NO] AXISLINE (axis) [ON {TOP | BOTTOM | LEFT | RIGHT}] [[NO] LEGEND [RIGHT | BOTTOM | ON (page x) (page y)] [color] LEGENDITEM [NO BITMAP | BITMAP "(PNG file name)"] [PAGEBITMAP "(PNG file name)"] [FRAME {TO FIT | left_x top_y right_x bottom_y}] [PAGE 0 0 right_x bottom_y] [BARWIDTH (double 0 - 1.0)] [BARSEPARATION (integer)] [BAROVERLAP (0 or 1)] [SKINNY] [MARKER marker_type] [PALETTE [TRANSPARENT] {"Tango" | "Bright" | "Light" | "Very Light" | "Blue Shades" | "Red Shades" | "Gray Shades"}] [THROUGHNULLS] [OTHERSLICE "(label)" (amount) (color)] [PAGENAME "(name)"] [TRANSLUCENCE (integer 0-255)] [LAYERS "(path to directory)"] [VERSION "(version string)"] SELECT (SQL select statement body);
PLOT SCATTER
X, DARK BUTTER CIRCLE
WITH
SCALE Y -1 1 1
TITLE "Title"
TITLE X "X Title"
TITLE Y "Y Title"
SELECT
4 * x * COS(y * 2 * PI()),
x * SIN(y * 2 * PI())
FROM ref2;
|
|
This is the work horse chart for drawing lines, markers, bars, and areas. It can also draw swaths and whenlines. There is an example here: "Lines and Markers".
These are extensions of LineChart providing different defaults. There are examples of bar charts here: "Charting Counts with SQL and Entrance".
Rotated bars. There are examples in this blog post "Rotated Bars".
Stacked bars. There are examples here: "Stacked Bars".
Plots (x,y) data points using markers or lines. There is an example on "Add a Second X or Y Axis".
These plot (time,y), (date,y) or (datetime, y) data points as a ScatterChart.
There are examples on "DATETIME-Y Charts" In version 1.5 and later versions, DATETIMEDIRCHART also plots vectors, see eg. Plotting Wind Direction and Speed
Displays an array of scatter charts plotting pairs of columns against each other. There are examples on "Correlation Charts".
Display high, low, open close values. These charts can also contain lines and markers. There are examples on "High Low Charts".
Displays tick "whiskers" on a vertical axis.
Draws a ScatterChart on a background image. There is an example in "Bitmap Charts".
Plots latitude, longitude points on images of the earth. There are examples in "EarthCharts", "Earthquakes," and "EarthChart and KML Export".
Paints colors on shape mask layers. Use a LAYERS series to match up strings in a database column with bitmap layers in the coloring book. Use COLOR OVERRIDE to assign the layers colors. TRANSLUCENCE determines how much layers show through each other. See "More About ColoringBooks" for an example.
Paints colors on the US states, for example to make the classic "Red-Blue States" map. See Coloring the US States for an example.
Draws a pie chart. There are examples on "Pies" and "Entrance Colors".
Examples: Radar Charts
Using Java® it is possible to extend the system with other chart types. Contact us for more details.
Draws axislabels on the X axis on the basic time series charts and on the Y axis on a RotatedBarChart. Without a modifier AXISLABELS will make a reasonable choice for the number of labels to skip between drawn labels.
ALL all labels will be drawn, ie. no labels are skipped
ONLY (n) only (n) labels will be drawn
See "Axis Labels" for examples.
[color] [line_type] [line_width]
Draws lines. Fully saturated colors like RED, BLUE, GREEN and the Tango Desktop colors work well for lines.
[color]
[color]
Draws areas.
[color] [marker_size] [marker_fill] marker_type
Draws markers or markers and lines. CIRCLE, BOX, and TRIANGLE are commonly used markers.
[color]
Draws stepped areas. See "Stepped Lines and Areas" for examples.
[color] [line_type] [line_width]
Draws stepped lines. See "Stepped Lines and Areas" for examples.
[color]
[color]
[color]
[color]
[color]
[color] [line_type]
[color] [line_type]
[color]
To specify red, green, blue values use RGB(r,g,b), and to specify them with alpha values use RGB(r,g,b,a).
There are color examples on "Entrance Colors".
These marker shapes are supported:
Paints color between lines. The first SWATH determines one side of the swath. The next SWATH determines the second side. If a third SWATH series is specified, color is painted between it and the second SWATH, and so on. The first swath color is ignored. Thereafter, color attributes are applied. See "Color a SWATH" for examples.
The length of vectors in a DateTimeDirChart. See eg. "Plotting Wind Direction and Spped"
The direction of vectors in a DateTimeDirChart, as degrees 0-360. See eg. "Plotting Wind Direction and Spped"
The high series in a HighLowChart.
The low series in a HighLowChart.
The open series in a HighLowChart.
The closer series in a HighLowChart.
Skips a column, ie. draws nothing.
Draws labels on pie slices.
Draws pie slices.
Draws data labels on points in a chart. Label alignment can be set.
Draws labelled vertical lines on a LineChart or one of its derived charts. Lines are drawn for non-null values, and labelled when the column contains a non-empty string.
Sets the LAYERNAME column for a ColoringBook. Use this for states names in a USColorBook.
Sets the column containing layer names in a ColoringBook or USColoringBook.
Color overrides change the color displayed for data points with a non-null value in the column assigned. Use color names like "RED", "BLUE" and so on in the column. &nbps; There are examples here "Legends".
Size overrides change the size of markers displayed for data points with a non-null value in the column assigned. The blog post "Bubble Charts" demonstrates the use of size overrides.
In a PieChart, EXPLODE values 0-100 are the percentage amount to offset pie slices out from the center of the pie. Null values mean "no offset".
Other Keywords
The chart setup can include features other than the basic series types. These should follow WITH.
Sets the scale of "axis", which can be X, X2, Y or Y2. When the axis is not specified it is assumed to be Y in a vertical chart, or X in a rotated chart. The scale can be set using the minimum, maximum, and increment or a logarithmic scale. LOG uses the natural log, and LOG10 is the log base 10.
Forces zero to be included in the axis scales for a chart.
Turns clipping on and off. When clipping is on nothing will be drawn outside the chart frame.
Uses "string" for a title above the chart. An unlimited number of titles may be drawn. When no alignment, LEFT, RIGHT or CENTER is specified, the title will be drawn centered.
Uses "string" for a title on (axis), which can be X, X2, Y, or Y2.
Uses "string" for a note below the chart. An unlimited number of notes may be drawn. When no alignment, LEFT, RIGHT or CENTER is specified, the note will be centered.
Uses "string" for a comment in the chart. An unlimited number of comments may be drawn. When no alignment, LEFT, RIGHT or CENTER is specified, the comment will be centered.
Specifies the format for labels on (axis), which can be X, X2, Y, or Y2.
AUTO determines the format automatically.
PLAIN uses integer labels
SCIENTIFIC uses scientific notation
DECIMAL uses the Java DecimalFormat protocol for numerical scales
In a (decimal format) string:
0 is a digit
# is a digit, trailing zeroes are supppressed
. is the decimal or money separator for the locale
, is the grouping separator
Decimal formats can contain can contain Unicode characters,
eg. \u00B0 for the degree symbol
The percentage symbol, %, triggers a multiply by 100. To avoid
this surround it with quotes like this: FORMAT Y DECIMAL "##.0'%'"
Use these patterns for the format string on a DateYChart,
TimeYChart, DateTimeYChart, or DateTimeDirChart:
%Y - four digit year
%y - two digit year
%m - month (00-12)
%b - abbreviated month name (Jan-Dec)
%d - day of the month (00-31)
%H - hours 00-23
%i - minutes 00-59
%S - seconds 00-59
%s - seconds 00-59
Determines the angle of X axis labels on a DateYChart, TimeYChart, or DateTimeYChart.
Turns grid lines on. When neither HORIZONTAL nor VERTICAL are specified both types will be turned on. The grid line color and line type can also be specified.
Set the font used for text in a chart. The font families availabel depends on the OS, but "sans serif", "serif", and "monospaced" are always available. The font_style can be PLAIN, BOLD, or ITALIC. Font sizes are specified in points.
Set the font used for titles. When TITLEFONT is absent, the FONT will be used.
Set the color used for the foreground elements in a chart.
Set the background color.
Set the frame color. The frame color will be the background color when FRAMECOLOR is absent.
Turns drawing the chart sides on and off.
Turns leaving a "collar" of space on the sides of the chart on and off.
Turns the Y axis on and off. It is on by default.
Turns the X axis on and off. It is on by default.
Turns the X2 axis on and off. It is on by default.
Turns the Y2 axis on and off. It is on by default.
Turns (axis) labels on and off. It can also set whether labels ore above or below a horizontal axis, or left or right of a vertical axis.
Turns (axis) tick marks on and off. It can also set whether the ticks ore above or below a horizontal axis, or left or right of a vertical axis.
Turns the (axis) line on and off.
Turns the legend on and off. This can also be used to place the legned to the right of the chart, below it, or with its upper left corner at (x,y). There are examples here: "Legends".
This keyword provides a way to add legend items to the legend, which is useful when you are using COLOR OVERRIDES. There are examples here: "Legends".
In a BitmapChart, "NO BITMAP" will cause the background bitmap not to be drawn. This can be useful when you want to flip back and forth between a bitmap background and a black background with the same scaling.
Specifies a PNG file to be used for the background image of the page.
FRAME TO FIT, which is the default, causes Entrance to fit the frame automatically. FRAME can also be used to set a frame to pixels within the current page. Use FRAME and PAGE together to make sparklines.
Sets the width and height of the page. (It is not possible to change the offset to the left corner--use frame instead) For example, use PAGE when you want to make small graphics for a cell phone.
Sets the width of bars as a percentage of the space available. See "Bar Charts" for examples.
Sets the separation between bars in device units. &nbps; See "Bar Charts" for examples.
Sets whether bars overlap or not: 0 is "not overlapped", 1 is "overlapped". . See "Bar Charts" for examples.
Draws the second set of bars at 1/3 the current bar width. Use SKINNY with BAROVERLAP 1. "Comparing Today to Yesterday" demonstrates its use.
Sets the default marker.
Deprecated. Sets the current palette.
By default, line segments end at null values. THROUGHNULLS cause them to be drawn between the valid values before and after null values.
Adds an additional pie slice and increases the pie total by (amount).
Sets the name to appear on an output tab.
Sets the translucens of layers in a ColoringBook.
Sets the paht to a directory containing image layers in a ColoringBook. See More "More About Coloring Books" for an example.
Sets the PLOT version required to run this script.
Colors
The "usual" colors plus colors from the Tango Desktop Palette are supported:
RED GREEN BLUE YELLOW CYAN MAGENTA WHITE LIGHTGRAY
GRAY DARKGRAY BLACK BUTTER ORANGE CHOCOLATE CHAMELEON
SKYBLUE PLUM SCARLETRED ALUMINUM CHARCOAL
Any color can be VERY LIGHT, LIGHT, DARK, or VERY DARK. They can also be TRANSPARENT or VERY TRANSPARENT.
Line Styles
These line styles are supported:
DOTTED DASHED SOLID
Line Widths
These line widths are supported:
THIN NORMAL THICK, VERY THICK
Marker Shapes
BOX DIAMOND
CIRCLE HORTICK
TRIANGLE VERTICK
OTHERTRIANGLE XSYMBOL
PLUS
Marker Size
Markers can be any of these sizes
TINY BIG
SMALL VERY BIG
VERY SMALL BARSIZE
Use BARSIZE to make the width of HORTICKS match the width of bars in a bar chart. Specify the size using a SIZE OVERRIDE column when you need other sizes or want sizes to vary. Override sizes are set using pixels.
Marker Fill
The marker fill type can be:
FILLED
UNFILLED
MASKED
Related URLs
http://dbentrance.com/docs/plotsyntax.html is this document
http://dbentrance.com/blog/ has tips and tricks