## org.das2.graph.DasPlot

DasPlot is the 2D plot containing a horizontal X axis and vertical Y axis, and a stack of Renderers that paint data onto the plot. It coordinates calls to each Renderer's updatePlotImage and render methods, and manages the rendered stack image to provide previews of new axis settings.

## DasPlot( org.das2.graph.DasAxis xAxis, org.das2.graph.DasAxis yAxis )

create a new plot with the x and y axes.

## PROP_LEGEND_WIDTH_LIMIT_PX

## PROP_TITLE

title for the plot

## PROP_FOCUSRENDERER

property name for the current renderer that the operator has selected.

## PROP_MULTILINETEXTALIGNMENT

property name for multiline labels, the horizontal alignment, where 0 is left, 0.5 is center, and 1.0 is right.

## DUMP_TO_FILE_ACTION

Action to dump the first (0th) renderer's data to a file.

## INFO

These levels are now taken from java.util.logging.Level. Generally INFO messages are displayed.

## WARNING

mark the log message as a warning where the operator should be aware.

## SEVERE

mark the log message as severe, where an error condition has occurred.

## PROP_DISPLAYTITLE

turns the plot title off or on.

## PROP_BOTTOMDECORATOR

## PROP_TOPDECORATOR

## PROP_CONTEXT

property where the plot context can be stored.

## PROP_DISPLAY_CONTEXT

necessary place to put the range of the data actually displayed. The context is the controller, and the displayContext closes the loop. This is mostly here to provide legacy support to Autoplot which abused the context property as both a write and read, and note there's a small problem that displayed items may have different display contexts. So this property should be used carefully, and generally when just one thing is visible.

## PROP_RENDERERS

## PROP_LEGENDPOSITION

the location of the legend position, which can be one of the four corners, or outside and to the right of the plot.

## PROP_LEGENDRELATIVESIZESIZE

relative font size for the legend. For example, -2 will use sans-8 when the plot font is sans-10.

## PROP_LEGENDFONTSIZE

## PROP_FONTSIZE

## PROP_DISPLAYLEGEND

true if the legend should be displayed

## PROP_DRAWBACKGROUND

the background should be drawn, if alpha is >0.

## PROP_DRAWGRIDCOLOR

if not transparent, draw the grid in this color. Otherwise the grid is drawn with the tick color.

## PROP_DRAWGRID

If true, faint grey lines continue the axis major ticks across the plot.

## PROP_DRAWMINORGRID

If true, faint grey lines continue the axis minor ticks across the plot.

## PROP_DRAWGRIDOVER

if true, then the grid is on top of the data.

## PROP_LINETHICKNESS

## PROP_PLOTVISIBLE

## PROP_OVERSIZE

boolean property indicating that the data outside the axis bounds is rendered, to smooth animation when the axis is panned.

## PROP_LONGTITLES

## PROP_LOG_LEVEL

the log level for the messages on the screen.

## PROP_PRINTINGLOGLEVEL

the log level to indicate the log level when printing.

## PROP_LOG_TIMEOUT_SEC

number of seconds to show the log messages. If Integer.MAX_VALUE/100 or greater then there is no timeout.

## PROP_ISOTROPIC

true if the x and y scaling (pixel:data) ratio is locked together.

## PROP_DRAWDEBUGMESSAGES

draw a purple box in the lower right corner indicating the number of times each renderer has updated, rendered, and the plot itself has painted.

## addCustomizer

addCustomizer( org.das2.graph.CustomizerKey key, org.das2.graph.Customizer customizer ) → void

Add a new customizer to the collection of customizers being used when creating new plots. The new customizer will be invoked last.

### Parameters

key - the new customizer's lookup key
customizer - the new customizer

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## addRenderer

addRenderer( org.das2.graph.Renderer rend ) → void

add the renderer to the stack of renderers. It will be the last element drawn. This fires off an PropertyChangeEvent with the old and new arrays of renderers.

### Parameters

rend - the renderer

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## addRenderer

addRenderer( int index, org.das2.graph.Renderer rend ) → void

add the renderer to the stack of renderers at the given index. Index 0 is drawn first. This will insert the renderer at the position. This fires off an PropertyChangeEvent with the old and new arrays of renderers.

### Parameters

index - the index, 0 is drawn first.
rend - the renderer

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## addToLegend

addToLegend( org.das2.graph.Renderer renderer, javax.swing.ImageIcon icon, int pos, String message ) → void

Add the message to the messages in the legend.

### Parameters

renderer - identifies the renderer adding to the legend
icon - if non-null, an icon to use. If null, the renderer's icon is used.
pos - integer order parameter, and also identifies item.
message - String message to display.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## contains

contains( int x, int y ) → boolean

since the plotVisible property can be false and the plot having no renderers, we want the mouse events to pass on to elements below them.

### Parameters

x - the mouse x
y - the mouse y

### Returns:

true if the plot "contains" this point.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## containsRenderer

containsRenderer( org.das2.graph.Renderer rend ) → boolean

return true if the plot contains the renderer.

### Parameters

rend - the renderer

### Returns:

true if the plot contains the renderer.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## createDummyPlot

createDummyPlot( ) → org.das2.graph.DasPlot

provide convenient method for creating a plot. For example:

>     DasCanvas c= new DasCanvas(400,400);
>     DasPlot p= DasPlot.createDummyPlot( );
>     c.add(p,DasRow.create(c,0,1),DasColumn.create(c,0,1));
>     JOptionPane.showConfirmDialog(None,c)

### Returns:

a DasPlot, reader to be added to a canvas.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## createPlot

createPlot( DatumRange xrange, DatumRange yrange ) → org.das2.graph.DasPlot

provide convenient method for creating a plot. For example:

>     DasCanvas c= new DasCanvas(400,400);
>     DasPlot p= DasPlot.createPlot( DatumRangeUtil.parseTimeRange('2001'),DatumRange.newDatumRange(0,10,Units.dimensionless) );
>     c.add(p,DasRow.create(c,0,1),DasColumn.create(c,0,1));
>     JOptionPane.showConfirmDialog(None,c)

### Parameters

xrange - the range for the x axis.
yrange - the range for the y axis

### Returns:

a DasPlot, reader to be added to a canvas.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## findRendererAt

findRendererAt( int x, int y ) → int

return the index of the renderer at canvas location (x,y), or -1 if no renderer is found at the position.

### Parameters

x - the x position on the canvas.
y - the y position on the canvas. Note 0,0 is the upper left corner.

### Returns:

the index of the renderer at the position, or -1 if no renderer is at the position.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getActiveRegion

getActiveRegion( ) → java.awt.Shape

return a Shape containing the plot.

### Returns:

a shape containing the active plot.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getAxisClip

getAxisClip( ) → java.awt.Rectangle

return the Rectangle where data is drawn, useful for clipping.

### Returns:

Rectangle in canvas coordinates.

### See Also:

DasDevicePosition#toRectangle(org.das2.graph.DasRow, org.das2.graph.DasColumn)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getBottomDecorator

getBottomDecorator( ) → org.das2.graph.Painter

### Returns:

org.das2.graph.Painter
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getContext

getContext( ) → DatumRange

convenient place to put the plot context. The context is used to store the timerange when there is no axis for it, for example, to show the state of data during a range.

### Returns:

the context

### See Also:

setContext(org.das2.datum.DatumRange)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getCustomizer

getCustomizer( org.das2.graph.CustomizerKey key ) → org.das2.graph.Customizer

### Parameters

key - a CustomizerKey

### Returns:

org.das2.graph.Customizer
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getCustomizerKeys

getCustomizerKeys( ) → java.util.List

Return a list of keys of all current customizing objects in the order they would be invoked.

### Returns:

the keys
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getDasColorBar

getDasColorBar( ) → org.das2.graph.DasColorBar

return the colorbar associated with this DasPlot. This loops through the renderers, from the top most to the bottom most, looking for the first with a non-null colorBar property.

### Returns:

null if not found or the dasColorBar most visible.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getDisplayContext

getDisplayContext( ) → DatumRange

### Returns:

the property value

### See Also:

PROP_DISPLAY_CONTEXT
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getDrawBackground

getDrawBackground( ) → java.awt.Color

return the background color, where alpha=0 (transparent) means don't draw the background.

### Returns:

the background color.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getDrawGridColor

getDrawGridColor( ) → java.awt.Color

### Returns:

the grid color

### See Also:

PROP_DRAWGRIDCOLOR
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getFocusRenderer

getFocusRenderer( ) → org.das2.graph.Renderer

get the current renderer that the operator has selected.

### Returns:

the current renderer that the operator has selected.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getFontSize

getFontSize( ) → String

### Returns:

java.lang.String
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getLegendFontSize

getLegendFontSize( ) → String

### Returns:

java.lang.String
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getLegendPosition

getLegendPosition( ) → org.das2.graph.LegendPosition

### Returns:

the current legend position

### See Also:

PROP_LEGENDPOSITION
LegendPosition
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getLegendRelativeFontSize

getLegendRelativeFontSize( ) → int

### Returns:

the current relative size of the legend in points.

### See Also:

PROP_LEGENDRELATIVESIZESIZE
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getLegendWidthLimitPx

getLegendWidthLimitPx( ) → int

width of plot required to show the legend labels.

### Returns:

int
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getLineThickness

getLineThickness( ) → String

### Returns:

java.lang.String
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getLogLevel

getLogLevel( ) → java.util.logging.Level

### Returns:

level

### See Also:

PROP_LOG_LEVEL
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getLogTimeoutSec

getLogTimeoutSec( ) → int

### Returns:

property value

### See Also:

PROP_LOG_TIMEOUT_SEC
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getMultiLineTextAlignment

getMultiLineTextAlignment( ) → float

get the horizontal alignment for multiline labels, where 0 is left, 0.5 is center, and 1.0 is right.

### Returns:

the alignment
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getPaintCount

getPaintCount( ) → int

get the diagnostic for the number of times the component was asked to paint itself since the last reset.

### Returns:

the number of times the component has painted itself.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getPrintingLogLevel

getPrintingLogLevel( ) → java.util.logging.Level

### Returns:

the level

### See Also:

PROP_PRINTINGLOGLEVEL
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getRenderer

getRenderer( int index ) → org.das2.graph.Renderer

return one of the renderers, which paint the data on to the plot.

### Parameters

index - the index of the renderer

### Returns:

the renderer
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getRenderers

getRenderers( ) → org.das2.graph.Renderer[]

return a list of the renderers, which paint the data on to the plot. This makes a copy of the renderer array.

### Returns:

the Renderer
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getTitle

getTitle( ) → String

Returns the title of this plot.

### Returns:

The plot title

### See Also:

setTitle(String)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getTopDecorator

getTopDecorator( ) → org.das2.graph.Painter

### Returns:

org.das2.graph.Painter
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getXAxis

getXAxis( ) → org.das2.graph.DasAxis

return the x (horizontal) axis.

### Returns:

the x axis
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getYAxis

getYAxis( ) → org.das2.graph.DasAxis

return the y (vertical) axis

### Returns:

the y axis
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## invalidateCacheImage

invalidateCacheImage( ) → void

mark the dasPlot's cache image as invalid, forcing it to repaint.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## invalidateCacheImageNoUpdate

invalidateCacheImageNoUpdate( ) → void

mark the dasPlot's cache image as invalid, but from the update method, so we don't need to update. (Updating results in a loop.)

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isCacheImageValid

isCacheImageValid( ) → boolean

introduced to debug Autoplot test018. This should not be used otherwise.

### Returns:

true if the cache image is marked as valid.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isDisplayLegend

isDisplayLegend( ) → boolean

true if the legend should be displayed

### Returns:

true if the legend should be displayed
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isDisplayTitle

isDisplayTitle( ) → boolean

return the state of enable/disable display of the title.

### Returns:

the current state.

### See Also:

setDisplayTitle(boolean)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isDrawDebugMessages

isDrawDebugMessages( ) → boolean

### Returns:

true if the messages should be shown.

### See Also:

PROP_DRAWDEBUGMESSAGES
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isDrawGrid

isDrawGrid( ) → boolean

Getter for property drawGrid. If true, faint grey lines continue the axis major ticks across the plot.

### Returns:

Value of property drawGrid.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isDrawGridOver

isDrawGridOver( ) → boolean

### Returns:

true if the grid is on top of the data.

### See Also:

PROP_DRAWGRIDOVER
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isDrawMinorGrid

isDrawMinorGrid( ) → boolean

Get the value of drawMinorGrid

### Returns:

the value of drawMinorGrid

### See Also:

PROP_DRAWMINORGRID
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isIsotropic

isIsotropic( ) → boolean

### Returns:

property value

### See Also:

PROP_ISOTROPIC
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isLongTitles

isLongTitles( ) → boolean

long titles means it won't clip at the axis bounds, at the risk of affecting codes which expect the old boundaries.

### Returns:

the longTitles property
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isOverSize

isOverSize( ) → boolean

### Returns:

oversize property

### See Also:

PROP_OVERSIZE
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isPlotVisible

isPlotVisible( ) → boolean

### Returns:

boolean
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isPreviewEnabled

isPreviewEnabled( ) → boolean

true if the data rendering will be scaled immediately to indicate axis state changes.

### Returns:

true if preview is enabled.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## postException

postException( org.das2.graph.Renderer renderer, java.lang.Exception exception ) → void

notify user of an exception, in the context of the plot. This is similar to postMessage(renderer, exception.getMessage(), DasPlot.SEVERE, null, null ) except that it does catch CancelledOperationExceptions and reduced the severity since the user probably initiated the condition.

### Parameters

renderer - the renderer posting the exception.
exception - the exception to post.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## postMessage

postMessage( org.das2.graph.Renderer renderer, String message, int messageType, Datum x, Datum y ) → void

Notify user of an exception, in the context of the plot. A position in the data space may be specified to locate the text within the data context. Note either or both x or y may be null. Messages must only be posted while the Renderer's render method is called, not during updatePlotImage. All messages are cleared before the render step. (TODO:check on this)

### Parameters

renderer - identifies the renderer posting the exception
message - the text to be displayed, may contain granny text.
messageType - DasPlot.INFO, DasPlot.WARNING, or DasPlot.SEVERE. (SEVERE was ERROR before)
x - if non-null, the location on the x axis giving context for the text.
y - if non-null, the location on the y axis giving context for the text.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## postMessage

postMessage( org.das2.graph.Renderer renderer, String message, java.util.logging.Level messageLevel, Datum x, Datum y ) → void

Notify user of an exception, in the context of the plot. A position in the data space may be specified to locate the text within the data context. Note either or both x or y may be null. Messages must only be posted while the Renderer's render method is called, not during updatePlotImage. All messages are cleared before the render step. (TODO:check on this)

### Parameters

renderer - identifies the renderer posting the exception
message - the text to be displayed, may contain granny text.
messageLevel - allows java.util.logging.Level to be used, for example Level.INFO, Level.WARNING, and Level.SEVERE
x - if non-null, the location on the x axis giving context for the text.
y - if non-null, the location on the y axis giving context for the text.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## releaseAll

releaseAll( ) → void

In Autoplot, we need a way to get help releasing all resources. This clears out all the mouse modules, axis references, etc. Basically anything that could have a reference to other parts of the system that we know we don't need here, explicitly remove the reference.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## removeCustomizer

removeCustomizer( org.das2.graph.CustomizerKey key ) → void

Remove the customizer that is associated with the given key.

### Parameters

key - the key to the customizer to be removed.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## removeRenderer

removeRenderer( org.das2.graph.Renderer rend ) → void

remove the renderer from the stack of renderers. A warning is logged if the renderer is not present. This fires off an PropertyChangeEvent with the old and new arrays of renderers.

### Parameters

rend - the renderer

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## removeRenderers

removeRenderers( ) → void

remove all the renderers from the dasPlot.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## repaint

repaint( ) → void

request that the plot be repainted. This contains commented code that counts the number of repaints.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## resetPaintCount

resetPaintCount( ) → void

reset the paint counter.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## resize

resize( ) → void

recalculate the bounds of the component. TODO: this is used a lot and needs to be explained in more detail.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setAxisPlotVisible

setAxisPlotVisible( boolean visible ) → void

set the visibility of both the plot and its x and y axes. Recently, setVisible(v) would do this, but it incorrectly couples the visible properties of the separate components.

### Parameters

visible - false if the x and y axes, and the plot is visisble.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setBottomDecorator

setBottomDecorator( org.das2.graph.Painter bottomDecorator ) → void

add additional painting code to the renderer, which is called after the renderer is called.

### Parameters

bottomDecorator - the Painter to call, or null to clear.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setContext

setContext( DatumRange context ) → void

convenient place to put the plot context. The context is used to store the timerange when there is no axis for it, for example, to show the state of data during a range. Note this may be null to support no context.

### Parameters

context - the context

### Returns:

void (returns nothing)

### See Also:

getContext()
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setDisplayContext

setDisplayContext( DatumRange displayContext ) → void

set the property

### Parameters

displayContext - null or the display context.

### Returns:

void (returns nothing)

### See Also:

PROP_DISPLAY_CONTEXT
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setDisplayLegend

setDisplayLegend( boolean displayLegend ) → void

true if the legend should be displayed

### Parameters

displayLegend - true if the legend should be displayed

### Returns:

void (returns nothing)

### See Also:

drawLegend(java.awt.Graphics2D, java.util.List)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setDisplayTitle

setDisplayTitle( boolean v ) → void

enable/disable display of the title. Often the title contains useful information describing the plot content that we want to know during interactive use but not when the plot is printed.

### Parameters

v - true if the title should be displayed.

### Returns:

void (returns nothing)

### See Also:

isDisplayTitle()
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setDrawBackground

setDrawBackground( java.awt.Color drawBackground ) → void

if not transparent, draw this background first.

### Parameters

drawBackground - the background, or a color with no opacity (new Color(0,0,0,0)) to turn off.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setDrawDebugMessages

setDrawDebugMessages( boolean v ) → void

### Parameters

v - true if the messages should be shown.

### Returns:

void (returns nothing)

### See Also:

PROP_DRAWDEBUGMESSAGES
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setDrawGrid

setDrawGrid( boolean drawGrid ) → void

Setter for property drawGrid. If true, faint grey lines continue the axis major ticks across the plot.

### Parameters

drawGrid - New value of property drawGrid.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setDrawGridColor

setDrawGridColor( java.awt.Color drawGridColor ) → void

if not transparent, draw the grid in this color. Otherwise the grid is drawn with the tick color.

### Parameters

drawGridColor - the color

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setDrawGridOver

setDrawGridOver( boolean gridOver ) → void

### Parameters

gridOver - if the grid is on top of the data.

### Returns:

void (returns nothing)

### See Also:

PROP_DRAWGRIDOVER
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setDrawMinorGrid

setDrawMinorGrid( boolean newdrawMinorGrid ) → void

Set the value of drawMinorGrid

### Parameters

newdrawMinorGrid - new value of drawMinorGrid

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setEnableRenderPropertiesAction

setEnableRenderPropertiesAction( boolean b ) → void

add or remove the menu item to get at the renderer properties. Das2 applications generally allow this so that applications don't have to bother handling this. Others like Autoplot have their own systems and uses for the click.

### Parameters

b - false to remove the menu item if it has been added.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setFocusRenderer

setFocusRenderer( org.das2.graph.Renderer focusRenderer ) → void

set the current renderer that the operator has selected.

### Parameters

focusRenderer - the current renderer that the operator has selected.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setFontSize

setFontSize( String fontSize ) → void

set the font size, with respect to the canvas font.

### Parameters

fontSize - a String

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setIsotropic

setIsotropic( boolean isotropic ) → void

set the property value

### Parameters

isotropic - property value

### Returns:

void (returns nothing)

### See Also:

PROP_ISOTROPIC
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setLegendFontSize

setLegendFontSize( String legendFontSize ) → void

set the font size for the legend, using the conventions where 1em is the parent's font size:

- 1em same as plot font.
- 2em twice plot font.
- 1em+2pt two points bigger than plot font.

### Parameters

legendFontSize - a String

### Returns:

void (returns nothing)

### See Also:

setFontSize(java.lang.String)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setLegendPosition

setLegendPosition( org.das2.graph.LegendPosition newlegendPosition ) → void

### Parameters

newlegendPosition - the legend position

### Returns:

void (returns nothing)

### See Also:

PROP_LEGENDPOSITION
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setLegendRelativeFontSize

setLegendRelativeFontSize( int size ) → void

set the relative size of the legend element text.

### Parameters

size - relative size in points.

### Returns:

void (returns nothing)

### See Also:

PROP_LEGENDRELATIVESIZESIZE
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setLegendWidthLimitPx

setLegendWidthLimitPx( int legendWidthLimitPx ) → void

width of plot required to show the legend labels.

### Parameters

legendWidthLimitPx - an int

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setLineThickness

setLineThickness( String lineThickness ) → void

set the thickness of the lines drawn.

### Parameters

lineThickness - a String

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setLogLevel

setLogLevel( java.util.logging.Level level ) → void

### Parameters

level - where Level.INFO is the default.

### Returns:

void (returns nothing)

### See Also:

PROP_LOG_LEVEL
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setLogTimeoutSec

setLogTimeoutSec( int logTimeoutSec ) → void

### Parameters

logTimeoutSec - the property value

### Returns:

void (returns nothing)

### See Also:

PROP_LOG_TIMEOUT_SEC
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setLongTitles

setLongTitles( boolean longTitles ) → void

long titles means it won't clip at the axis bounds, at the risk of affecting codes which expect the old boundaries.

### Parameters

longTitles - a boolean

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setMultiLineTextAlignment

setMultiLineTextAlignment( float multiLineTextAlignment ) → void

set the horizontal alignment for multiline labels, where 0 is left, 0.5 is center, and 1.0 is right.

### Parameters

multiLineTextAlignment - the alignment

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setOverSize

setOverSize( boolean overSize ) → void

### Parameters

overSize - true means draw outside the axis bounds.

### Returns:

void (returns nothing)

### See Also:

PROP_OVERSIZE
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setPlotVisible

setPlotVisible( boolean plotVisible ) → void

### Parameters

plotVisible - a boolean

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setPreviewEnabled

setPreviewEnabled( boolean preview ) → void

if true then the data rendering will be scaled immediately to indicate axis state changes.

### Parameters

preview - true if preview should be enabled.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setPrintingLogLevel

setPrintingLogLevel( java.util.logging.Level printingLogLevel ) → void

### Parameters

printingLogLevel - where Level.ALL is the default.

### Returns:

void (returns nothing)

### See Also:

PROP_PRINTINGLOGLEVEL
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setReduceOutsideLegendTopMargin

setReduceOutsideLegendTopMargin( boolean reduceOutsideLegendTopMargin ) → void

Used at APL for layout. This is off by default. This appears to shift the Y position.

### Parameters

reduceOutsideLegendTopMargin - shift the Y position.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setTitle

setTitle( String t ) → void

Sets the title which will be displayed above this plot. null or empty string may be used to turn off the title.

### Parameters

t - The new title for this plot.

### Returns:

void (returns nothing)

### See Also:

setDisplayTitle(boolean)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setTopDecorator

setTopDecorator( org.das2.graph.Painter topDecorator ) → void

add additional painting code to the renderer, which is called after the renderer is called.

### Parameters

topDecorator - the Painter to call, or null to clear.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setXAxis

setXAxis( org.das2.graph.DasAxis xAxis ) → void

set the x axis. This removes property change listeners to the old axis and adds PCLs to the new axis.

### Parameters

xAxis - a horizontal axis.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setYAxis

setYAxis( org.das2.graph.DasAxis yAxis ) → void

Attaches a new axis to the plot. The old axis is disconnected, and the plot will listen to the new axis. Also, the row and column for the axis is set, but this might change in the future. null appears to be a valid input as well.

### Parameters

yAxis - a vertical axis.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]