Skip to content

Excel tool for multiple kind of chart generation (ternary diagram, stacked chart...)

License

Notifications You must be signed in to change notification settings

ADerycke/Series-Plotter

Repository files navigation

header fr

image image

Series-Plotter : General introduction

This file Series plotter(version).xlsm is simply made to accelerate significantly Excel chart production, and add other kind of chart not natively handle by Excel (e.g., ternary diagram, stacked "temporal" chart...). The file also include tools for geosciences like :

  • allowing to add grid for binary and ternary diagram, with a list of already implemented geochemical grids (cf. grid file).
  • allowing to automatically normalise geochemical data, with a list of already implemented geochemical normalisation (cf. normalisation file).

It's never perfect so maybe you gonna encounter some troubles and errors, so don't hesitate to report me any problem. There is no restriction to use and distribute the "Series Plotter" files, as long as you refer this GitHub.

Excel version :

  • should work on any version earlier than Excel 2016
  • never tested on version older than Excel 2016
  • some utilities/tools may not work on the restrained version of Excel (as students version or application)

Systems :

  • Windows 10 (32bit) : not tested but should work
  • Windows 10 (64bit) : tested and work
  • Windows 11 (64bit) : not tested but should work
  • MacOS (Monterey) : tested and work for most of the main functionnalities

For the MacOS user, several development facilities are not included in Mac Excel, so i'm working on correcting bug and make work all the functionnalities... but it take time. List of know problems : save as .pdf (but save as .svg...), export in a .ppt (not natively possible by now)....

Conceptor : Alexis Derycke

Summary :

- How to use the file

- How to set-up the layout (color, shape,...)

- Graphic type : XY , XYZ (Z as color), ternary diagram, vertical stacked XY, geological time scale, spider diagram, normalisation, grids, better regression...

- How to select the data for the "Plot from selection"

- How to select the X-Y-Z axes in the "Graphics list" sheet

How to use the file

You just have to download the file, opening it and allow the macro execution. To help you to understand the file, there is some tips (like the real excel) that pop if you let your mouse above most of the button :

image

You also can find several videos (~2min) in the helping folder that gonna introduce you to the file and show you quickly how to use it. Associate data examples are in the folder to easily test the series plotter and reproduce what its show in videos.

If you want to simply play with Series Plotter, you can click on "Data template" in the HELP group and it gonna automatically add a dataset to play with.

image Plot from selections

  • step 1 : open the file and allow macro execution
  • step 2 : add some data to the "Data & Graphics" sheet. You can do it as any other excel sheets, or click on "Data template" in the HELP
  • step 3 : select a range like for any classical Excel plot (like two columns for example)
  • step 4 : chose the type of plot. To do so, clik on dropdown "Select the graphic(s) type" in the ribbon and select the wanted plot (e.g. "XY - classic")
  • step 5 : generate the graphic(s). To do so, click on the "Plot from selections" button

image Plot from headers

  • step 1 : open the file and allow macro execution
  • step 2 : add some data to the "Data & Graphics" sheet. You can do it as any other excel sheets, or click on "Data template" in the HELP. The data structuration is quite simple : first row = hearder, second row = unit, thrid row = empty.
  • step 3 : retriver your data header. To do so, click on the "Get column" button
  • step 4 : chose the data to plot. To do so, go on the "Graphic list" sheet and select the corresponding position in the grid
  • step 5 : chose the type of plot. To do so, clik on dropdown "Select the graphic(s) type" in the ribbon and select the wanted plot (e.g. "XY - classic")
  • step 6 : chose the header with sample ID. To do so, clik on the left dropdown of "sample determination" in the ribbon and select the appropriate header (e.g. "Name")
  • step 7 : generate the graphic(s). To do so, click on the "Plot from headers" button

For more options, let your mouse on any button and a screen tips gonna appear, or read the following documentations

quick_view.mp4

Plot data uncertainty and / or error

If you use "Plot from headers" the excel file can automatically handle the error-bar add. To do so, you just have to add the data uncertainty/error in the following column with the headers including "±". The error can be enter as absolute ("[unit]") or relative ("[%]"), if uncertainty/error column don't have any unit, it will be considere at absolut error, otherwise you have to add "%" to the header unit.

image

If you want, you can automatically had uncertainty/error header by using the "Data tools" option.

How to set-up the layout (color, shape,...) :

All graphs/plots are full Excel graphs/plots (event more complex one as stacked or ternary plot), so you can edit/copy/use them like any other Excel graphs/plots.

In additiona to this manual editing, you can modify several parameters for all graphs/plots automatically using the ribbon or the "Layout" sheets.

Ribbon options :

image

This include different options to help you to handle your data, like :

  • clean all the Data & Graphics sheets
  • converting cells see as "string" by Excel to "number" properly recognise
  • add a "sarting row" to lets some row above the headers (to enter data information, constante, etc)
  • do an automatic layout for the headers
  • etc

You can find all the options to change and retriver the series layout :

  • "series layout" will open a small windows to edit series layouts of all graph at the same time
  • "retriver series color" will retriver the series colors form a graph for the next plotting
  • "retriver graph layout" allow you to completely custom your graph and use this layout for latter plot

Right click options :

image

You can right click on series to :

  • add regression to data with associated predicted envelop
  • ad 95% enveloppe of an XY dataset
  • add min/max/mean of an Y dataset
  • add first, last quartile and median of an Y dataset
  • add a moving average on a XY temporal dataset

Or right click on a axe to :

  • add a constant
  • replace the axe by a time scale

RC - regression

RC - axe et autre

Sheets "Layout" options :

It's not mandatory to use this sheets, it's only if you want to setup and re-use custom series layout.

You can right click on cells of the "Color" column and a colors selection window gonna appear, after the selection the cell gonna take the color you select.

You can copy and past the color obtains to all cells, it gonna work. If you remove the value inside the cell, then the color goes back to "nul", meaning automatic to excel.

image

If you select multiple cells, then it gonna automatically generate a color gradient :

image

Graphic type :

graphic XY (grid) :

graph XY

option 1 : you can plot error as classical bar or as elipse by selecting it in "plot options"

graph XY - elispe

option 2 : for binary diagram, multiple automatic grid are already ready to add to graph

image

graph XY - grid

graphic XYZ (Z as color) :

Zcolor - 1

note : min and max value are determined automatically from the dataset. You can select a third color and indicate its value. You can also select an automatic round of the min and max value. Zcolor

graphic XYZ (ternary diagram) :

graph XYZ graph XYZ (bis)

note : for ternary diagram, multiple automatic grid are already ready to add to graph

image

graphic XY - stacked :

graph stacked X graph stacked Y

note : the scale change is done thanks to optional parameters

image

Geological time scale :

timescale

note : this is a classical excel plot, so you can edit it (min, max, size...) as any other excel chart. By now the added Geological Time Scale correspond to the 2022. It was added using the work of M. J. Williams. After generation, the graph will include the Period name (hidded in the picture above)

You can select between different resolution and/or add any time scale using the button "Add a time scale" on the "Other options". If you select a graph/chart before clicking on Plot, the time scale will replace the corresponding axes.

image

timescale 2

graphic Y (spectra/spider diagram) :

graph Y

graph Y - mean

note : for spider diagram, an automatic normalisation is possible. This normalisation gonna be applied/remove to your data in fonction of what you want. The available normalisation can be found and selected on the "Normalisation" sheet that apprear after it selection.

image

regression and mobil average

lin  reg

moving average

note : you can add this to any series by rigth clicking on a serie :

image

normal law and KDE calculation :

graph Normal law

weigth mean plot and calculation :

graph-Ages  Ma

X - Histogram (automatic generation) :

X - Histogram

note : when you select this, you enter the wanted range (here 6 to 18) and the wanted interval (here 1) and excel gonna automatically calculate the distribution in your dataset

Fit of multiple gaussian to a KDE distribution :

graph preak determination

Radial plot design by Galbraith (1988) for error visualisation

graph - radial plot

note : by now this plot is only a representation, I'm currently waiting python implementation in excel to allow complex statistic calculation in it.

How to select the data for the "Plot from selection" :

  • graphic XY : column 1 = axe X, column 2 = axe Y
  • graphic XY - stacked : column 1 = axe X and column 2 = axe Y (chart 1); column 3 = axe X and column 4 = axe Y (chart 2) ; etc...
  • graphic XYZ (Z as color) : column 1 = axe X, column 2 = axe Y, column 3 = color
  • graphic XYZ (ternary diagram) : column 1 = Left, column 2 = Top, column 3 = Right, (column 4 = Bot.)
  • X - Histogram (automatic generation) : column 1 = data

Example of selection for a ternary diagram : image

How to select the axes in the "Graphics list" :

graphic XY :

Just enter X and Y axes ...

image

graphic XY - stacked :

you can use same or different X axes for the time

image

graphic XYZ (Z as color) :

the Z axe is read in the area as the X axe

image

graphic XYZ (ternary diagram) :

the 3 pole of the ternary diagram is read only on the X axe (add a fourth one to get a double ternary diagram)

image

graphic Y (spectra/spider diagram) :

use only the X axe to enter the data to plot, you can generate only one chart at time.

image

X - Histogram (automatic generation) :

use only the X axe to determine the data to plot (one data = one chart)

image

Statistical plots :

no need of the "Graphics list", it just use the selected range as for "Plot from selection". Just select the data you want to analyse and clik on the proper button.

  • normal law and KDE (basic distribution) : column 1 = data, optinal column two = error
  • weigth mean plot and calculation : column 1 = data, column two = error
  • fit of multiple gaussian to a KDE distribution : column 1 = data, optinal : column two = error

About

Excel tool for multiple kind of chart generation (ternary diagram, stacked chart...)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published