Jenkins : Plot Plugin

Plugin Information

View Plot on the plugin site for more information.

2.0.0 version of the plugin brings Jenkins Pipeline support. It might break compatibility if you update from 1.X versions, as it contains some API changes. Please test in non-production environment before update.

This plugin provides generic plotting (or graphing) capabilities in Jenkins.

This plugin will plot one or more single values variations across builds in one or more plots. Plots for a particular job (or project) are configured in the job configuration screen, where each field has additional help information. Each plot can have one or more lines (called data series). After each build completes the plots' data series latest values are pulled from Java properties file(s), CSV file(s), or XML file(s) via an XPath (which you should have generated during the build) somewhere below your workspace. Data for each plot is stored in a CSV file within the job's root project directory.

It can generate various kind of plots, including Area, Bar, Line, Stacked Bar, Waterfall...

Here is an example of the plots generated by this plugin:


Currently supported parameters

The currently supported parameters are:

  • width (int, default: 750) The width of the plot in pixels.

  • height (int, default: 750) The height of the plot in pixels.
  • rightBuildNum (int, default: 2^38 - 1) The right-most build number on the plot.
  • hasLegend (boolean, default: true) Whether or not the plot has a legend.
  • urlNumBuilds (string, default: 2^38 - 1) Number of builds back to show on this plot from URL.
  • urlTitle (string, default: "") Title of plot from URL.
  • urlStyle (string, default: "") Style of plot from URL.
  • urlUseDescr (boolean, default: false) Use description flag from URL.
  • title (string, default: "") Title of plot.
  • yaxis (string, default: "") Y-axis label.
  • series (list) List of data series.
  • group (string) Group name that this plot belongs to.
  • numBuilds (string, default:"") Number of builds back to show on this plot. An empty string means all builds. Must not be "0".
  • csvFileName (string, default: "$ROOT_DIR/plot-XXXX.csv") The name of the CSV file that persists the plots data. The CSV file is stored in the projects root directory. This is different from the source CSVle that can be used as a source for the plot.
  • csvLastModification (long, default: "last modified date") The date of the last change to the CSV file.
  • style (string, default: "line") Style of plot: line, line3d, stackedArea, stackedBar, etc.
  • useDescr (boolean, default: false) Whether or not to use build descriptions as X-axis labels.
  • keepRecords (boolean, default: false) Keep records for builds that were deleted.
  • exclZero (boolean, default: false) Whether or not to exclude zero as default Y-axis value.
  • logarithmic (boolean, default: false) Use a logarithmic Y-axis.
  • yaxisMinimum (string, default: "") Minimum y-axis value.
  • yaxisMaximum (string, default: "") Maximum y-axis value.

For a full list of parameters the best place to view is class.

Example Usage to generate detailed PMD reports

Attached is a Perl script which generates more detailed "summaries" out of PMD report files. We use this for several code analysis projects, all named trunk.codeanalysis.prefix.

To have all resulting plots on one page, give all Plots the same plot group. Because each code quality has its very own range, define each on a separate plot, not as an additional data series.

Pipeline job configuration

You can generate the required Scripted Pipeline syntax via the Snippet Generator by choosing the "plot: Plot build data" step.

Below you can find sample configuration which is auto-generated using Snippet Generator.

plot csvFileName: 'plot-8e54e334-ab7b-4c9f-94f7-b9d8965723df.csv', 
        csvSeries: [[
                            file: 'data.csv',
                            exclusionValues: '',
                            displayTableFlag: false,
                            inclusionFlag: 'OFF',
                            url: '']],
        group: 'Plot Group',
        title: 'Plot Title',
        style: 'line',
        exclZero: false,
        keepRecords: false,
        logarithmic: false,
        numBuilds: '',
        useDescr: false,
        yaxis: '',
        yaxisMaximum: '',
        yaxisMinimum: ''
  • csvFileName - autogenerated value, but you might want to change it to something more descriptive for your case.
  • file - source file for plot generation (relative to workspace)

JIRA issues

If you have any proposals/bug reports, please create an issue on Jenkins JIRA.

Key Summary T Created Updated Due Assignee Reporter P Status Resolution
JENKINS-65619 Allow plot plugin source CSV name to include environment variables Improvement May 12, 2021 May 12, 2021 Veaceslav Gaidarji Michael Minor Open Unresolved
JENKINS-63469 plot plugin losing csv series configuration on next project configuration edit Bug Aug 21, 2020 Aug 21, 2020 Veaceslav Gaidarji Kevin Broselge Minor Open Unresolved
JENKINS-63234 plot plugin should not remove points related to kept forever biulds. Improvement Jul 28, 2020 Jul 28, 2020 Veaceslav Gaidarji jlpinardon Trivial Open Unresolved
JENKINS-62800 plot plugin broken on Jenkins >2.263 Bug Jun 25, 2020 May 10, 2021 Veaceslav Gaidarji Félix Queiruga Balado Minor Open Unresolved
JENKINS-62731 add plot style with pie Improvement Jun 20, 2020 Jun 20, 2020 Veaceslav Gaidarji alice zhu Blocker Open Unresolved
JENKINS-62730 the first column always was shown abnormally when plot style was set to bar or bar 3D in plot plugin Bug Jun 20, 2020 Jun 20, 2020 Veaceslav Gaidarji alice zhu Critical Open Unresolved
JENKINS-62729 the legend name of plot plugin was shown abnormally. Bug Jun 20, 2020 Jun 20, 2020 Veaceslav Gaidarji alice zhu Blocker Open Unresolved
JENKINS-60691 javax.servlet.ServletException: org.apache.commons.jelly.JellyTagException: jar:file:/var/cache/jenkins/war/WEB-INF/lib/jenkins-core-2.34.jar!/lib/form/block.jelly:32:22: <d:invokeBody> hudson/matrix/MatrixProject Bug Jan 08, 2020 Jan 10, 2020 Veaceslav Gaidarji Jagjeet Chadha Blocker Open Unresolved
JENKINS-59237 Add possibility to define hight, width and hasLegend with plot command New Feature Sep 05, 2019 Sep 05, 2019 Veaceslav Gaidarji Christian Treczoks Minor Open Unresolved
JENKINS-58433 Plot plugin doesn't display data points from previous builds in case of multiple .properties files Bug Jul 10, 2019 Jul 10, 2019 Veaceslav Gaidarji Jatin Mehta Major Open Unresolved
JENKINS-58410 Plot plugin csv file not getting created in project root directory Bug Jul 09, 2019 Jul 09, 2019 Veaceslav Gaidarji Jatin Mehta Major Open Unresolved
JENKINS-56291 Plot Plugin + Jenkinsfile: New plots will not be displayed in Plot section until the build succeeds Bug Feb 26, 2019 Feb 27, 2019 Veaceslav Gaidarji Bharath R Major Open Unresolved
JENKINS-56086 Tabs missing in configuration page after adding plot to freestyle job Bug Feb 11, 2019 Apr 23, 2020 Veaceslav Gaidarji Michał Marcinkowski Minor Open Unresolved
JENKINS-54745 Specify font size, or automatically scale it as plot size grows Improvement Nov 21, 2018 Nov 21, 2018 Veaceslav Gaidarji Alberto Mardegan Minor Open Unresolved
JENKINS-54714 Allow downloading raw CSV data for external processing Improvement Nov 20, 2018 Jul 09, 2019 Veaceslav Gaidarji Alberto Mardegan Minor Open Unresolved
JENKINS-54307 Plot plugin is not working for zero values on logaritmic scale Bug Oct 29, 2018 Oct 30, 2018 Veaceslav Gaidarji david gomez Major Open Unresolved
JENKINS-54017 Plot for Color blind New Feature Oct 11, 2018 Jul 03, 2021 Veaceslav Gaidarji Tim Schlüter Minor Open Unresolved
JENKINS-54016 Independent plot data table option Improvement Oct 11, 2018 Oct 11, 2018 Veaceslav Gaidarji Tim Schlüter Minor Open Unresolved
JENKINS-53992 Multiple use of xml file in plots Bug Oct 10, 2018 Oct 10, 2018 Veaceslav Gaidarji Tim Schlüter Major Open Unresolved
JENKINS-53939 Plot plugin configuration in pipeline script - run job on remote node - graph not shown Bug Oct 08, 2018 Dec 26, 2018 Veaceslav Gaidarji Lubov Shilin Major Open Unresolved
Authenticate to retrieve your issues
Showing 20 out of 67 issues

Change Log

Version 2.1.1 (Jun 14, 2019) 
Version 2.1.0 (Jun 4, 2018) 
Version 2.0.5 (May 15, 2018) 
  • Update values table CSS style and number formatting (PR-47). 
Version 2.0.4 (May 5, 2018) 
  • Fix chart style value comparison, STACKED_AREA in particular (JENKINS-50924). 
Version 2.0.3 (January 24, 2018) 
Version 2.0.2 (January 3, 2018) 
  • Fixed ConcurrentModificationException in (JENKINS-48465)
  • Fixed typo's in help files (JENKINS-48530)
  • Moved plugin description to wiki (JENKINS-48537)
  • Configured Checkstyle and reformatted the project according to the rules
Version 2.0.0 (November 2, 2017) 
Version 1.11 (April 26, 2017) 
  • Final Release: includes all PRs and fixes up to now
Version 1.9 (Mar 15, 2015)
Version 1.8 (Sep 28, 2014)
Version 1.7 (Mar 11, 2014)
  • Fixed issues parsing XML files, introduced in version 1.6 (JENKINS-21493).
Version 1.6 (Jan 16, 2014)
Version 1.5 (Jul 10, 2011)
Version 1.4 (Nov 21, 2010)
Version 1.3 (Jul 20, 2010)
  • Configurable graph style for each plot.
  • Read data from XML files (JENKINS-2796).
  • Read data from CSV files (JENKINS-2899).
  • Update code for more recent Hudson.
Version 1.2 (Sep 24, 2008)


examplePlot.png (image/png) (text/x-perl)
plotRightEdge.png (image/png)
jenkins-plotplugin.png (image/png)