npPlot plugin

About this plugin

This plugin allow you to show plots or charts on your publications. If you want an easy way to show a plot to your publications users then npPlot plugin is for you. The plot offer to you three graph styles: lines, smooth lines with B-Splines, and bars. You can manage more than one plot at a time.

It has multilined title, legend, automatic y-axis, and supports multiple series, and more. It also can produce a monochrome version of the graph using monochromatic brushes. And allow you to control the plot with their provided mouse up, mouse down and mouse move complete events.

Thirparty

This plugin are imposible without the aid of this people:

Thanks a lot!

Plugin actions index

npPlotCreate

Create a new Plot object instance and attach it to a NeoBook rectangle object. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npPlotDestroy

Destroy a previously created Plot object instance and deattach it from their NeoBook rectangle object. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npPlotDestroyAll

Destroy all currently availables instances of Plot objects. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npPlotAddSeries

Add a new Plot series on a Plot object instance. Provide the name of the Plot series, and get it, because other plugin actions need it to, for example, clear the Plot series. Also provide the type/style for the Plot series. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npPlotClearSeries

Clear a previosly added Plot series from a Plot object instance. If you want to delete a Plot series, use npPlotDeleteSeries. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npPlotDeleteSeries

Delete a previosly added Plot series from a Plot object instance. Note that if you delete a Plot series, cannot add X and Y values before create again. See also npPlotClearSeries, that only clear the series values, but not delete the Plot series. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npPlotBeginUpdate

Prepare a Plot object instance to be updated with lots of Plot series X and Y values. No needed when add not much Plot series values, but very recommended in other case. Remember to use npPlotEndUpdate after add the series values. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npPlotAddXY

Add X and Y values for an existing Plot series on an Plot object instance. Before you use this action need to add some Plot series, see npPlotAddSeries. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npPlotEndUpdate

Tell to a Plot object instance that lots of Plot series X and Y values has been added. See npPlotBeginUpdate. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npPlotOptions

Specify general options of a Plot object instance. Below you can see the list of available Plot general options. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npPlotTitleOptions

Set the title options of a Plot object instance. The title text can contain "[#13]" as line separator; the title font must be in "NeoBook format". The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npPlotAxisXOptions

Specify the chart axis X options of a Plot object instance. You can scale the horizontal axis so it shows different values than the original data. This is useful, for example, if you want to supply the data in real values, but want to show the axis in thousands. In this case, simply set the X axis scale option to 1000. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npPlotAxisYOptions

Specify the chart axis X options of a Plot object instance. You can scale the horizontal axis so it shows different values than the original data. This is useful, for example, if you want to supply the data in real values, but want to show the axis in thousands. In this case, simply set the Y axis scale option to 1000. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npPlotMetafile

Save the Plot object instance to a metafile (WMF format). The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npPlotClipboard

Save the Plot object instance to the Windows clipboard as a graphic. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npPlotMonochrome

Determine if a Plot object instance show using colors or monochrome. By default Plot are show using colors. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npOnPlotMouseUp

Set a subroutine to be execute when a Plot object instance mouse up event are fired. This event offer you the X and Y axis values at the mouse point in the appropiate variables. The rectangle variable store the name of Plot rectangle object that fire the event. Also provide the button that fired the event, that can be one of the following values: mbLeft, mbRight or mbMiddle. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npOnPlotMouseDown

Set a subroutine to be execute when a Plot object instance mouse down event are fired. This event offer you the X and Y axis values at the mouse point in the appropiate variables. The rectangle variable store the name of Plot rectangle object that fire the event. Also provide the button that fired the event, that can be one of the following values: mbLeft, mbRight or mbMiddle. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

npOnPlotMouseMove

Set a subroutine to be execute when a Plot object instance mouse move event are fired. This event offer you the X and Y axis values at the mouse point in the appropiate variables. The rectangle variable store the name of Plot rectangle object that fire the event. The result variable store "True" if everything is OK, or "False" if not. In this last case the [LastError] contain information about the error.

↑↑

Action errors subroutine

All the NeoPlugins deal with errors in the same way that NeoBook does: when the plugin found an action error the [LastError] variable store information about the error, so you can take care about this variable when execute an action.

But all the NeoPlugins also incorporate an advanced way to deal with possible action errors. You can define a subroutine named OnNeoPluginActionError in order to be executed when some action error are found and you can use this variables inside:

Note that this error handling subroutine are shared for all the NeoPlugins, so you no need to specify a subroutine for every plugin you use in your publication because the same subroutine are recognized and automagically used by every NeoPlugin. Below you can view a sample of this subroutine code:

:OnNeoPluginActionError
  AlertBox "NeoPlugin Error" "Error [LastError] in plugin: [PluginName]"
Return

Also note that the use of this NeoPlugins error handling subroutine is completelly optional. You can continue using the [LastError] variable as usual and even use the both methods at the same time.

↑↑