Created a Plot module that allows you to easily plot data from a Mat.

parent f861dc9e
set(the_description "Plot function for Mat/std::vector data.")
ocv_define_module(plot opencv_core opencv_highgui)
Plot Module Overview
====================
Created by Nuno Moutinho
This Plot module allows you to easily plot data in 1D or 2D. You can change the size of the window, the limits of the axis and the colors of each element. You can also show in real time the plot you are building or save the plot as an image (png).
<!DOCTYPE html>
<html lang="en" class="">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# object: http://ogp.me/ns/object# article: http://ogp.me/ns/article# profile: http://ogp.me/ns/profile#">
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Language" content="en">
<title>opencv/sin_x.png at opencv_adding_plot · nmoutinho/opencv</title>
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub">
<link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub">
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-114.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-144.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144.png">
<meta property="fb:app_id" content="1401488693436528">
<meta content="@github" name="twitter:site" /><meta content="summary" name="twitter:card" /><meta content="nmoutinho/opencv" name="twitter:title" /><meta content="opencv - Open Source Computer Vision Library" name="twitter:description" /><meta content="https://avatars2.githubusercontent.com/u/9116444?v=3&amp;s=400" name="twitter:image:src" />
<meta content="GitHub" property="og:site_name" /><meta content="object" property="og:type" /><meta content="https://avatars2.githubusercontent.com/u/9116444?v=3&amp;s=400" property="og:image" /><meta content="nmoutinho/opencv" property="og:title" /><meta content="https://github.com/nmoutinho/opencv" property="og:url" /><meta content="opencv - Open Source Computer Vision Library" property="og:description" />
<meta name="browser-stats-url" content="/_stats">
<link rel="assets" href="https://assets-cdn.github.com/">
<link rel="conduit-xhr" href="https://ghconduit.com:25035">
<link rel="xhr-socket" href="/_sockets">
<meta name="pjax-timeout" content="1000">
<link rel="sudo-modal" href="/sessions/sudo_modal">
<meta name="msapplication-TileImage" content="/windows-tile.png">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="selected-link" value="repo_source" data-pjax-transient>
<meta name="google-analytics" content="UA-3769691-2">
<meta content="collector.githubapp.com" name="octolytics-host" /><meta content="collector-cdn.github.com" name="octolytics-script-host" /><meta content="github" name="octolytics-app-id" /><meta content="5972BB9A:730F:257F589:550458C7" name="octolytics-dimension-request_id" /><meta content="9116444" name="octolytics-actor-id" /><meta content="nmoutinho" name="octolytics-actor-login" /><meta content="8f487c4d8d0c0bf24b8bc5bf2ca67f0ea7673ef10fd6803b34490272673097ad" name="octolytics-actor-hash" />
<meta content="Rails, view, blob#show" name="analytics-event" />
<link rel="icon" type="image/x-icon" href="https://assets-cdn.github.com/favicon.ico">
<meta content="authenticity_token" name="csrf-param" />
<meta content="icTGXXzVgl7hQ8UJrJFwtHetTEUueLuggdJWejSmap8PSrUTb97o8L2psaMjibAQMLccPieStZYjirGcgSRHkg==" name="csrf-token" />
<link href="https://assets-cdn.github.com/assets/github-85e4ac99403eefa73664d9b122f27095fee8b7333e67f34fa34480ae497f7555.css" media="all" rel="stylesheet" />
<link href="https://assets-cdn.github.com/assets/github2-901780fdaaa6b0f56b2004899a7a24194bf4217cc7864291a9f68fa3a9264fdf.css" media="all" rel="stylesheet" />
<meta http-equiv="x-pjax-version" content="8060cc7a9543870628764b4fdb4264ea">
<meta name="description" content="opencv - Open Source Computer Vision Library">
<meta name="go-import" content="github.com/nmoutinho/opencv git https://github.com/nmoutinho/opencv.git">
<meta content="9116444" name="octolytics-dimension-user_id" /><meta content="nmoutinho" name="octolytics-dimension-user_login" /><meta content="31965147" name="octolytics-dimension-repository_id" /><meta content="nmoutinho/opencv" name="octolytics-dimension-repository_nwo" /><meta content="true" name="octolytics-dimension-repository_public" /><meta content="true" name="octolytics-dimension-repository_is_fork" /><meta content="5108051" name="octolytics-dimension-repository_parent_id" /><meta content="Itseez/opencv" name="octolytics-dimension-repository_parent_nwo" /><meta content="5108051" name="octolytics-dimension-repository_network_root_id" /><meta content="Itseez/opencv" name="octolytics-dimension-repository_network_root_nwo" />
<link href="https://github.com/nmoutinho/opencv/commits/opencv_adding_plot.atom" rel="alternate" title="Recent Commits to opencv:opencv_adding_plot" type="application/atom+xml">
</head>
<body class="logged_in env-production linux vis-public fork page-blob">
<a href="#start-of-content" tabindex="1" class="accessibility-aid js-skip-to-content">Skip to content</a>
<div class="wrapper">
<div class="header header-logged-in true" role="banner">
<div class="container clearfix">
<a class="header-logo-invertocat" href="https://github.com/" data-hotkey="g d" aria-label="Homepage" data-ga-click="Header, go to dashboard, icon:logo">
<span class="mega-octicon octicon-mark-github"></span>
</a>
<div class="site-search repo-scope js-site-search" role="search">
<form accept-charset="UTF-8" action="/nmoutinho/opencv/search" class="js-site-search-form" data-global-search-url="/search" data-repo-search-url="/nmoutinho/opencv/search" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /></div>
<input type="text"
class="js-site-search-field is-clearable"
data-hotkey="s"
name="q"
placeholder="Search"
data-global-scope-placeholder="Search GitHub"
data-repo-scope-placeholder="Search"
tabindex="1"
autocapitalize="off">
<div class="scope-badge">This repository</div>
</form>
</div>
<ul class="header-nav left" role="navigation">
<li class="header-nav-item explore">
<a class="header-nav-link" href="/explore" data-ga-click="Header, go to explore, text:explore">Explore</a>
</li>
<li class="header-nav-item">
<a class="header-nav-link" href="https://gist.github.com" data-ga-click="Header, go to gist, text:gist">Gist</a>
</li>
<li class="header-nav-item">
<a class="header-nav-link" href="/blog" data-ga-click="Header, go to blog, text:blog">Blog</a>
</li>
<li class="header-nav-item">
<a class="header-nav-link" href="https://help.github.com" data-ga-click="Header, go to help, text:help">Help</a>
</li>
</ul>
<ul class="header-nav user-nav right" id="user-links">
<li class="header-nav-item dropdown js-menu-container">
<a class="header-nav-link name" href="/nmoutinho" data-ga-click="Header, go to profile, text:username">
<img alt="Nuno Moutinho" class="avatar" data-user="9116444" height="20" src="https://avatars1.githubusercontent.com/u/9116444?v=3&amp;s=40" width="20" />
<span class="css-truncate">
<span class="css-truncate-target">nmoutinho</span>
</span>
</a>
</li>
<li class="header-nav-item dropdown js-menu-container">
<a class="header-nav-link js-menu-target tooltipped tooltipped-s" href="#" aria-label="Create new..." data-ga-click="Header, create new, icon:add">
<span class="octicon octicon-plus"></span>
<span class="dropdown-caret"></span>
</a>
<div class="dropdown-menu-content js-menu-content">
<ul class="dropdown-menu">
<li>
<a href="/new" data-ga-click="Header, create new repository, icon:repo"><span class="octicon octicon-repo"></span> New repository</a>
</li>
<li>
<a href="/organizations/new" data-ga-click="Header, create new organization, icon:organization"><span class="octicon octicon-organization"></span> New organization</a>
</li>
<li class="dropdown-divider"></li>
<li class="dropdown-header">
<span title="nmoutinho/opencv">This repository</span>
</li>
<li>
<a href="/nmoutinho/opencv/settings/collaboration" data-ga-click="Header, create new collaborator, icon:person"><span class="octicon octicon-person"></span> New collaborator</a>
</li>
</ul>
</div>
</li>
<li class="header-nav-item">
<a href="/notifications" aria-label="You have no unread notifications" class="header-nav-link notification-indicator tooltipped tooltipped-s" data-ga-click="Header, go to notifications, icon:read" data-hotkey="g n">
<span class="mail-status all-read"></span>
<span class="octicon octicon-inbox"></span>
</a>
</li>
<li class="header-nav-item">
<a class="header-nav-link tooltipped tooltipped-s" href="/settings/profile" id="account_settings" aria-label="Settings" data-ga-click="Header, go to settings, icon:settings">
<span class="octicon octicon-gear"></span>
</a>
</li>
<li class="header-nav-item">
<form accept-charset="UTF-8" action="/logout" class="logout-form" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="+iNSoYNvNKufCn/785y3nPCxLNN8VlzOVmQ21k7DrMvIes4uMYFcbf08RekOlo9rHjTAybcEUxxAxuXwIoFGCw==" /></div>
<button class="header-nav-link sign-out-button tooltipped tooltipped-s" aria-label="Sign out" data-ga-click="Header, sign out, icon:logout">
<span class="octicon octicon-sign-out"></span>
</button>
</form> </li>
</ul>
</div>
</div>
<div id="start-of-content" class="accessibility-aid"></div>
<div class="site" itemscope itemtype="http://schema.org/WebPage">
<div id="js-flash-container">
</div>
<div class="pagehead repohead instapaper_ignore readability-menu">
<div class="container">
<ul class="pagehead-actions">
<li>
<form accept-charset="UTF-8" action="/notifications/subscribe" class="js-social-container" data-autosubmit="true" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="vZMnnJPCpw+hT7NPqv+XVN2j+pX8a/fYnxcCoO03XPL3B3lnYh8XPTFzvkpTFuEE1eT6FVDDk0kvbw0Y8+Su4g==" /></div> <input id="repository_id" name="repository_id" type="hidden" value="31965147" />
<div class="select-menu js-menu-container js-select-menu">
<a href="/nmoutinho/opencv/subscription"
class="minibutton select-menu-button with-count js-menu-target" role="button" tabindex="0" aria-haspopup="true"
data-ga-click="Repository, click Watch settings, action:blob#show">
<span class="js-select-button">
<span class="octicon octicon-eye"></span>
Unwatch
</span>
</a>
<a class="social-count js-social-count" href="/nmoutinho/opencv/watchers">
1
</a>
<div class="select-menu-modal-holder">
<div class="select-menu-modal subscription-menu-modal js-menu-content" aria-hidden="true">
<div class="select-menu-header">
<span class="select-menu-title">Notifications</span>
<span class="octicon octicon-x js-menu-close" role="button" aria-label="Close"></span>
</div>
<div class="select-menu-list js-navigation-container" role="menu">
<div class="select-menu-item js-navigation-item " role="menuitem" tabindex="0">
<span class="select-menu-item-icon octicon octicon-check"></span>
<div class="select-menu-item-text">
<input id="do_included" name="do" type="radio" value="included" />
<span class="select-menu-item-heading">Not watching</span>
<span class="description">Be notified when participating or @mentioned.</span>
<span class="js-select-button-text hidden-select-button-text">
<span class="octicon octicon-eye"></span>
Watch
</span>
</div>
</div>
<div class="select-menu-item js-navigation-item selected" role="menuitem" tabindex="0">
<span class="select-menu-item-icon octicon octicon octicon-check"></span>
<div class="select-menu-item-text">
<input checked="checked" id="do_subscribed" name="do" type="radio" value="subscribed" />
<span class="select-menu-item-heading">Watching</span>
<span class="description">Be notified of all conversations.</span>
<span class="js-select-button-text hidden-select-button-text">
<span class="octicon octicon-eye"></span>
Unwatch
</span>
</div>
</div>
<div class="select-menu-item js-navigation-item " role="menuitem" tabindex="0">
<span class="select-menu-item-icon octicon octicon-check"></span>
<div class="select-menu-item-text">
<input id="do_ignore" name="do" type="radio" value="ignore" />
<span class="select-menu-item-heading">Ignoring</span>
<span class="description">Never be notified.</span>
<span class="js-select-button-text hidden-select-button-text">
<span class="octicon octicon-mute"></span>
Stop ignoring
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</li>
<li>
<div class="js-toggler-container js-social-container starring-container ">
<form accept-charset="UTF-8" action="/nmoutinho/opencv/unstar" class="js-toggler-form starred js-unstar-button" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="rmYHI9r5OdFew6GHyVEcDcmnA1Akmhnuwq+JO3+OhvQDUxNhL691LoBLvERqdUy/VoxkT19WPR9nsTbKrCcC5Q==" /></div>
<button
class="minibutton with-count js-toggler-target"
aria-label="Unstar this repository" title="Unstar nmoutinho/opencv"
data-ga-click="Repository, click unstar button, action:blob#show; text:Unstar">
<span class="octicon octicon-star"></span>
Unstar
</button>
<a class="social-count js-social-count" href="/nmoutinho/opencv/stargazers">
0
</a>
</form>
<form accept-charset="UTF-8" action="/nmoutinho/opencv/star" class="js-toggler-form unstarred js-star-button" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="lBWWCY1vnHAZCdcFvJwhM8x31HPCKtXZaRIfok5WmUbZfubSF16akXGRPDOB3BgWsm1ibVY0S7QuCKHAsuO+nQ==" /></div>
<button
class="minibutton with-count js-toggler-target"
aria-label="Star this repository" title="Star nmoutinho/opencv"
data-ga-click="Repository, click star button, action:blob#show; text:Star">
<span class="octicon octicon-star"></span>
Star
</button>
<a class="social-count js-social-count" href="/nmoutinho/opencv/stargazers">
0
</a>
</form> </div>
</li>
<li>
<a href="#fork-destination-box" class="minibutton with-count"
title="Fork your own copy of nmoutinho/opencv to your account"
aria-label="Fork your own copy of nmoutinho/opencv to your account"
rel="facebox"
data-ga-click="Repository, show fork modal, action:blob#show; text:Fork">
<span class="octicon octicon-repo-forked"></span>
Fork
</a>
<a href="/nmoutinho/opencv/network" class="social-count">4,317</a>
<div id="fork-destination-box" style="display: none;">
<h2 class="facebox-header">Where should we fork this repository?</h2>
<include-fragment src=""
class="js-fork-select-fragment fork-select-fragment"
data-url="/nmoutinho/opencv/fork?fragment=1">
<img alt="Loading" height="64" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-128-338974454bb5c32803e82f601beb051d373744b024fe8742a76009700fd7e033.gif" width="64" />
</include-fragment>
</div>
</li>
</ul>
<h1 itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="entry-title public">
<span class="mega-octicon octicon-repo-forked"></span>
<span class="author"><a href="/nmoutinho" class="url fn" itemprop="url" rel="author"><span itemprop="title">nmoutinho</span></a></span><!--
--><span class="path-divider">/</span><!--
--><strong><a href="/nmoutinho/opencv" class="js-current-repository" data-pjax="#js-repo-pjax-container">opencv</a></strong>
<span class="page-context-loader">
<img alt="" height="16" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-32-e513294efa576953719e4e2de888dd9cf929b7d62ed8d05f25e731d02452ab6c.gif" width="16" />
</span>
<span class="fork-flag">
<span class="text">forked from <a href="/Itseez/opencv">Itseez/opencv</a></span>
</span>
</h1>
</div><!-- /.container -->
</div><!-- /.repohead -->
<div class="container">
<div class="repository-with-sidebar repo-container new-discussion-timeline ">
<div class="repository-sidebar clearfix">
<nav class="sunken-menu repo-nav js-repo-nav js-sidenav-container-pjax js-octicon-loaders"
role="navigation"
data-pjax="#js-repo-pjax-container"
data-issue-count-url="/nmoutinho/opencv/issues/counts">
<ul class="sunken-menu-group">
<li class="tooltipped tooltipped-w" aria-label="Code">
<a href="/nmoutinho/opencv/tree/opencv_adding_plot" aria-label="Code" class="selected js-selected-navigation-item sunken-menu-item" data-hotkey="g c" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches /nmoutinho/opencv/tree/opencv_adding_plot">
<span class="octicon octicon-code"></span> <span class="full-word">Code</span>
<img alt="" class="mini-loader" height="16" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-32-e513294efa576953719e4e2de888dd9cf929b7d62ed8d05f25e731d02452ab6c.gif" width="16" />
</a> </li>
<li class="tooltipped tooltipped-w" aria-label="Pull Requests">
<a href="/nmoutinho/opencv/pulls" aria-label="Pull Requests" class="js-selected-navigation-item sunken-menu-item" data-hotkey="g p" data-selected-links="repo_pulls /nmoutinho/opencv/pulls">
<span class="octicon octicon-git-pull-request"></span> <span class="full-word">Pull Requests</span>
<span class="js-pull-replace-counter"></span>
<img alt="" class="mini-loader" height="16" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-32-e513294efa576953719e4e2de888dd9cf929b7d62ed8d05f25e731d02452ab6c.gif" width="16" />
</a> </li>
</ul>
<div class="sunken-menu-separator"></div>
<ul class="sunken-menu-group">
<li class="tooltipped tooltipped-w" aria-label="Pulse">
<a href="/nmoutinho/opencv/pulse" aria-label="Pulse" class="js-selected-navigation-item sunken-menu-item" data-selected-links="pulse /nmoutinho/opencv/pulse">
<span class="octicon octicon-pulse"></span> <span class="full-word">Pulse</span>
<img alt="" class="mini-loader" height="16" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-32-e513294efa576953719e4e2de888dd9cf929b7d62ed8d05f25e731d02452ab6c.gif" width="16" />
</a> </li>
<li class="tooltipped tooltipped-w" aria-label="Graphs">
<a href="/nmoutinho/opencv/graphs" aria-label="Graphs" class="js-selected-navigation-item sunken-menu-item" data-selected-links="repo_graphs repo_contributors /nmoutinho/opencv/graphs">
<span class="octicon octicon-graph"></span> <span class="full-word">Graphs</span>
<img alt="" class="mini-loader" height="16" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-32-e513294efa576953719e4e2de888dd9cf929b7d62ed8d05f25e731d02452ab6c.gif" width="16" />
</a> </li>
</ul>
<div class="sunken-menu-separator"></div>
<ul class="sunken-menu-group">
<li class="tooltipped tooltipped-w" aria-label="Settings">
<a href="/nmoutinho/opencv/settings" aria-label="Settings" class="js-selected-navigation-item sunken-menu-item" data-selected-links="repo_settings /nmoutinho/opencv/settings">
<span class="octicon octicon-tools"></span> <span class="full-word">Settings</span>
<img alt="" class="mini-loader" height="16" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-32-e513294efa576953719e4e2de888dd9cf929b7d62ed8d05f25e731d02452ab6c.gif" width="16" />
</a> </li>
</ul>
</nav>
<div class="only-with-full-nav">
<div class="clone-url open"
data-protocol-type="http"
data-url="/users/set_protocol?protocol_selector=http&amp;protocol_type=clone">
<h3><span class="text-emphasized">HTTPS</span> clone URL</h3>
<div class="input-group js-zeroclipboard-container">
<input type="text" class="input-mini input-monospace js-url-field js-zeroclipboard-target"
value="https://github.com/nmoutinho/opencv.git" readonly="readonly">
<span class="input-group-button">
<button aria-label="Copy to clipboard" class="js-zeroclipboard minibutton zeroclipboard-button" data-copied-hint="Copied!" type="button"><span class="octicon octicon-clippy"></span></button>
</span>
</div>
</div>
<div class="clone-url "
data-protocol-type="ssh"
data-url="/users/set_protocol?protocol_selector=ssh&amp;protocol_type=clone">
<h3><span class="text-emphasized">SSH</span> clone URL</h3>
<div class="input-group js-zeroclipboard-container">
<input type="text" class="input-mini input-monospace js-url-field js-zeroclipboard-target"
value="git@github.com:nmoutinho/opencv.git" readonly="readonly">
<span class="input-group-button">
<button aria-label="Copy to clipboard" class="js-zeroclipboard minibutton zeroclipboard-button" data-copied-hint="Copied!" type="button"><span class="octicon octicon-clippy"></span></button>
</span>
</div>
</div>
<div class="clone-url "
data-protocol-type="subversion"
data-url="/users/set_protocol?protocol_selector=subversion&amp;protocol_type=clone">
<h3><span class="text-emphasized">Subversion</span> checkout URL</h3>
<div class="input-group js-zeroclipboard-container">
<input type="text" class="input-mini input-monospace js-url-field js-zeroclipboard-target"
value="https://github.com/nmoutinho/opencv" readonly="readonly">
<span class="input-group-button">
<button aria-label="Copy to clipboard" class="js-zeroclipboard minibutton zeroclipboard-button" data-copied-hint="Copied!" type="button"><span class="octicon octicon-clippy"></span></button>
</span>
</div>
</div>
<p class="clone-options">You can clone with
<a href="#" class="js-clone-selector" data-protocol="http">HTTPS</a>, <a href="#" class="js-clone-selector" data-protocol="ssh">SSH</a>, or <a href="#" class="js-clone-selector" data-protocol="subversion">Subversion</a>.
<a href="https://help.github.com/articles/which-remote-url-should-i-use" class="help tooltipped tooltipped-n" aria-label="Get help on which URL is right for you.">
<span class="octicon octicon-question"></span>
</a>
</p>
<a href="/nmoutinho/opencv/archive/opencv_adding_plot.zip"
class="minibutton sidebar-button"
aria-label="Download the contents of nmoutinho/opencv as a zip file"
title="Download the contents of nmoutinho/opencv as a zip file"
rel="nofollow">
<span class="octicon octicon-cloud-download"></span>
Download ZIP
</a>
</div>
</div><!-- /.repository-sidebar -->
<div id="js-repo-pjax-container" class="repository-content context-loader-container" data-pjax-container>
<a href="/nmoutinho/opencv/blob/8599c9e4921a18f7344413e1b79757a792c71b25/modules/plot/doc/images/sin_x.png" class="hidden js-permalink-shortcut" data-hotkey="y">Permalink</a>
<!-- blob contrib key: blob_contributors:v21:748af008ddb2efc420c6307f1eb647bc -->
<div class="file-navigation js-zeroclipboard-container">
<div class="select-menu js-menu-container js-select-menu left">
<span class="minibutton select-menu-button js-menu-target css-truncate" data-hotkey="w"
data-master-branch="master"
data-ref="opencv_adding_plot"
title="opencv_adding_plot"
role="button" aria-label="Switch branches or tags" tabindex="0" aria-haspopup="true">
<span class="octicon octicon-git-branch"></span>
<i>branch:</i>
<span class="js-select-button css-truncate-target">opencv_adding_…</span>
</span>
<div class="select-menu-modal-holder js-menu-content js-navigation-container" data-pjax aria-hidden="true">
<div class="select-menu-modal">
<div class="select-menu-header">
<span class="select-menu-title">Switch branches/tags</span>
<span class="octicon octicon-x js-menu-close" role="button" aria-label="Close"></span>
</div>
<div class="select-menu-filters">
<div class="select-menu-text-filter">
<input type="text" aria-label="Find or create a branch…" id="context-commitish-filter-field" class="js-filterable-field js-navigation-enable" placeholder="Find or create a branch…">
</div>
<div class="select-menu-tabs">
<ul>
<li class="select-menu-tab">
<a href="#" data-tab-filter="branches" data-filter-placeholder="Find or create a branch…" class="js-select-menu-tab">Branches</a>
</li>
<li class="select-menu-tab">
<a href="#" data-tab-filter="tags" data-filter-placeholder="Find a tag…" class="js-select-menu-tab">Tags</a>
</li>
</ul>
</div>
</div>
<div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="branches">
<div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring">
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/nmoutinho/opencv/blob/2.4/modules/plot/doc/images/sin_x.png"
data-name="2.4"
data-skip-pjax="true"
rel="nofollow">
<span class="select-menu-item-icon octicon octicon-check"></span>
<span class="select-menu-item-text css-truncate-target" title="2.4">
2.4
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/nmoutinho/opencv/blob/2.4.8.x-prep/modules/plot/doc/images/sin_x.png"
data-name="2.4.8.x-prep"
data-skip-pjax="true"
rel="nofollow">
<span class="select-menu-item-icon octicon octicon-check"></span>
<span class="select-menu-item-text css-truncate-target" title="2.4.8.x-prep">
2.4.8.x-prep
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/nmoutinho/opencv/blob/2.4.9.x-prep/modules/plot/doc/images/sin_x.png"
data-name="2.4.9.x-prep"
data-skip-pjax="true"
rel="nofollow">
<span class="select-menu-item-icon octicon octicon-check"></span>
<span class="select-menu-item-text css-truncate-target" title="2.4.9.x-prep">
2.4.9.x-prep
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/nmoutinho/opencv/blob/2.4.10.x-prep/modules/plot/doc/images/sin_x.png"
data-name="2.4.10.x-prep"
data-skip-pjax="true"
rel="nofollow">
<span class="select-menu-item-icon octicon octicon-check"></span>
<span class="select-menu-item-text css-truncate-target" title="2.4.10.x-prep">
2.4.10.x-prep
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/nmoutinho/opencv/blob/master/modules/plot/doc/images/sin_x.png"
data-name="master"
data-skip-pjax="true"
rel="nofollow">
<span class="select-menu-item-icon octicon octicon-check"></span>
<span class="select-menu-item-text css-truncate-target" title="master">
master
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open selected"
href="/nmoutinho/opencv/blob/opencv_adding_plot/modules/plot/doc/images/sin_x.png"
data-name="opencv_adding_plot"
data-skip-pjax="true"
rel="nofollow">
<span class="select-menu-item-icon octicon octicon-check"></span>
<span class="select-menu-item-text css-truncate-target" title="opencv_adding_plot">
opencv_adding_plot
</span>
</a>
</div>
<form accept-charset="UTF-8" action="/nmoutinho/opencv/branches" class="js-create-branch select-menu-item select-menu-new-item-form js-navigation-item js-new-item-form" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="HVxB1DcsR8AzOJzllwMsF802X7cGIUsL37HX9Cs1vtzJ1kW3ZWenWOOTa1izOkd8nGM24xp4qNKk3AwP9CMpiw==" /></div>
<span class="octicon octicon-git-branch select-menu-item-icon"></span>
<div class="select-menu-item-text">
<span class="select-menu-item-heading">Create branch: <span class="js-new-item-name"></span></span>
<span class="description">from ‘opencv_adding_plot’</span>
</div>
<input type="hidden" name="name" id="name" class="js-new-item-value">
<input type="hidden" name="branch" id="branch" value="opencv_adding_plot">
<input type="hidden" name="path" id="path" value="modules/plot/doc/images/sin_x.png">
</form>
</div>
<div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="tags">
<div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring">
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/perf4au/modules/plot/doc/images/sin_x.png"
data-name="perf4au"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="perf4au">perf4au</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/carma_release.0.0.1/modules/plot/doc/images/sin_x.png"
data-name="carma_release.0.0.1"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="carma_release.0.0.1">carma_release.0.0.1</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/3.0-ocl-tp2/modules/plot/doc/images/sin_x.png"
data-name="3.0-ocl-tp2"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="3.0-ocl-tp2">3.0-ocl-tp2</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/3.0-ocl-tech-preview/modules/plot/doc/images/sin_x.png"
data-name="3.0-ocl-tech-preview"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="3.0-ocl-tech-preview">3.0-ocl-tech-preview</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/3.0.0-beta/modules/plot/doc/images/sin_x.png"
data-name="3.0.0-beta"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="3.0.0-beta">3.0.0-beta</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/3.0.0-alpha/modules/plot/doc/images/sin_x.png"
data-name="3.0.0-alpha"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="3.0.0-alpha">3.0.0-alpha</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.11/modules/plot/doc/images/sin_x.png"
data-name="2.4.11"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.11">2.4.11</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.10.1/modules/plot/doc/images/sin_x.png"
data-name="2.4.10.1"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.10.1">2.4.10.1</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.10/modules/plot/doc/images/sin_x.png"
data-name="2.4.10"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.10">2.4.10</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.9.1/modules/plot/doc/images/sin_x.png"
data-name="2.4.9.1"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.9.1">2.4.9.1</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.9/modules/plot/doc/images/sin_x.png"
data-name="2.4.9"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.9">2.4.9</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.8.3/modules/plot/doc/images/sin_x.png"
data-name="2.4.8.3"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.8.3">2.4.8.3</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.8.2/modules/plot/doc/images/sin_x.png"
data-name="2.4.8.2"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.8.2">2.4.8.2</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.8.1/modules/plot/doc/images/sin_x.png"
data-name="2.4.8.1"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.8.1">2.4.8.1</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.8/modules/plot/doc/images/sin_x.png"
data-name="2.4.8"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.8">2.4.8</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.7-rc1/modules/plot/doc/images/sin_x.png"
data-name="2.4.7-rc1"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.7-rc1">2.4.7-rc1</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.7.2/modules/plot/doc/images/sin_x.png"
data-name="2.4.7.2"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.7.2">2.4.7.2</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.7.1/modules/plot/doc/images/sin_x.png"
data-name="2.4.7.1"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.7.1">2.4.7.1</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.7/modules/plot/doc/images/sin_x.png"
data-name="2.4.7"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.7">2.4.7</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.6.2-rc1/modules/plot/doc/images/sin_x.png"
data-name="2.4.6.2-rc1"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.6.2-rc1">2.4.6.2-rc1</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.6.2r3/modules/plot/doc/images/sin_x.png"
data-name="2.4.6.2r3"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.6.2r3">2.4.6.2r3</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.6.2r2/modules/plot/doc/images/sin_x.png"
data-name="2.4.6.2r2"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.6.2r2">2.4.6.2r2</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.6.2/modules/plot/doc/images/sin_x.png"
data-name="2.4.6.2"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.6.2">2.4.6.2</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.6.1/modules/plot/doc/images/sin_x.png"
data-name="2.4.6.1"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.6.1">2.4.6.1</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.6/modules/plot/doc/images/sin_x.png"
data-name="2.4.6"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.6">2.4.6</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.5/modules/plot/doc/images/sin_x.png"
data-name="2.4.5"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.5">2.4.5</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.4-beta/modules/plot/doc/images/sin_x.png"
data-name="2.4.4-beta"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.4-beta">2.4.4-beta</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.4/modules/plot/doc/images/sin_x.png"
data-name="2.4.4"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.4">2.4.4</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.3-rc/modules/plot/doc/images/sin_x.png"
data-name="2.4.3-rc"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.3-rc">2.4.3-rc</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.3.2/modules/plot/doc/images/sin_x.png"
data-name="2.4.3.2"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.3.2">2.4.3.2</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.3.1/modules/plot/doc/images/sin_x.png"
data-name="2.4.3.1"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.3.1">2.4.3.1</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.3/modules/plot/doc/images/sin_x.png"
data-name="2.4.3"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.3">2.4.3</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.2/modules/plot/doc/images/sin_x.png"
data-name="2.4.2"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.2">2.4.2</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.1/modules/plot/doc/images/sin_x.png"
data-name="2.4.1"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.1">2.4.1</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.0/modules/plot/doc/images/sin_x.png"
data-name="2.4.0"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.0">2.4.0</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.3.1/modules/plot/doc/images/sin_x.png"
data-name="2.3.1"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.3.1">2.3.1</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.3.0/modules/plot/doc/images/sin_x.png"
data-name="2.3.0"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.3.0">2.3.0</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.2/modules/plot/doc/images/sin_x.png"
data-name="2.2"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.2">2.2</a>
</div>
</div>
<div class="select-menu-no-results">Nothing to show</div>
</div>
</div>
</div>
</div>
<div class="button-group right">
<a href="/nmoutinho/opencv/find/opencv_adding_plot"
class="js-show-file-finder minibutton empty-icon tooltipped tooltipped-s"
data-pjax
data-hotkey="t"
aria-label="Quickly jump between files">
<span class="octicon octicon-list-unordered"></span>
</a>
<button aria-label="Copy file path to clipboard" class="js-zeroclipboard minibutton zeroclipboard-button" data-copied-hint="Copied!" type="button"><span class="octicon octicon-clippy"></span></button>
</div>
<div class="breadcrumb js-zeroclipboard-target">
<span class='repo-root js-repo-root'><span itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"><a href="/nmoutinho/opencv/tree/opencv_adding_plot" class="" data-branch="opencv_adding_plot" data-direction="back" data-pjax="true" itemscope="url"><span itemprop="title">opencv</span></a></span></span><span class="separator">/</span><span itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"><a href="/nmoutinho/opencv/tree/opencv_adding_plot/modules" class="" data-branch="opencv_adding_plot" data-direction="back" data-pjax="true" itemscope="url"><span itemprop="title">modules</span></a></span><span class="separator">/</span><span itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"><a href="/nmoutinho/opencv/tree/opencv_adding_plot/modules/plot" class="" data-branch="opencv_adding_plot" data-direction="back" data-pjax="true" itemscope="url"><span itemprop="title">plot</span></a></span><span class="separator">/</span><span itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"><a href="/nmoutinho/opencv/tree/opencv_adding_plot/modules/plot/doc" class="" data-branch="opencv_adding_plot" data-direction="back" data-pjax="true" itemscope="url"><span itemprop="title">doc</span></a></span><span class="separator">/</span><span itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"><a href="/nmoutinho/opencv/tree/opencv_adding_plot/modules/plot/doc/images" class="" data-branch="opencv_adding_plot" data-direction="back" data-pjax="true" itemscope="url"><span itemprop="title">images</span></a></span><span class="separator">/</span><strong class="final-path">sin_x.png</strong>
</div>
</div>
<include-fragment class="commit commit-loader file-history-tease" src="/nmoutinho/opencv/contributors/opencv_adding_plot/modules/plot/doc/images/sin_x.png">
<div class="file-history-tease-header">
Fetching contributors&hellip;
</div>
<div class="participation">
<p class="loader-loading"><img alt="" height="16" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-32-EAF2F5-0bdc57d34b85c4a4de9d0d1db10cd70e8a95f33ff4f46c5a8c48b4bf4e5a9abe.gif" width="16" /></p>
<p class="loader-error">Cannot retrieve contributors at this time</p>
</div>
</include-fragment>
<div class="file">
<div class="file-header">
<div class="file-actions">
<div class="button-group">
<a href="/nmoutinho/opencv/raw/opencv_adding_plot/modules/plot/doc/images/sin_x.png" class="minibutton " id="raw-url">Raw</a>
<a href="/nmoutinho/opencv/commits/opencv_adding_plot/modules/plot/doc/images/sin_x.png" class="minibutton " rel="nofollow">History</a>
</div><!-- /.button-group -->
<form accept-charset="UTF-8" action="/nmoutinho/opencv/delete/opencv_adding_plot/modules/plot/doc/images/sin_x.png" aria-label="Delete this file" class="tooltipped tooltipped-s inline-form delete-file-form" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="n8kTwioPXFzkgZbw82npv1lrUEOxKt8SEo0Jd0y6ZKQ/jSmUiv8bfJQp7yS22J7qW1ELSzGcLzrAZ0IhwrS7UQ==" /></div>
<button class="web-edit-button"
type="submit"
data-disable-with>
<span class="octicon octicon-trashcan "></span>
</button>
</form> </a>
</div><!-- /.actions -->
<div class="file-info">
13.789 kb
</div>
</div>
<div class="blob-wrapper data type-text">
<div class="image">
<span class="border-wrap"><img src="/nmoutinho/opencv/blob/opencv_adding_plot/modules/plot/doc/images/sin_x.png?raw=true" alt="sin_x.png"></span>
</div>
</div>
</div>
<a href="#jump-to-line" rel="facebox[.linejump]" data-hotkey="l" style="display:none">Jump to Line</a>
<div id="jump-to-line" style="display:none">
<form accept-charset="UTF-8" class="js-jump-to-line-form">
<input class="linejump-input js-jump-to-line-field" type="text" placeholder="Jump to line&hellip;" autofocus>
<button type="submit" class="button">Go</button>
</form>
</div>
</div>
</div><!-- /.repo-container -->
<div class="modal-backdrop"></div>
</div><!-- /.container -->
</div><!-- /.site -->
</div><!-- /.wrapper -->
<div class="container">
<div class="site-footer" role="contentinfo">
<ul class="site-footer-links right">
<li><a href="https://status.github.com/" data-ga-click="Footer, go to status, text:status">Status</a></li>
<li><a href="https://developer.github.com" data-ga-click="Footer, go to api, text:api">API</a></li>
<li><a href="https://training.github.com" data-ga-click="Footer, go to training, text:training">Training</a></li>
<li><a href="https://shop.github.com" data-ga-click="Footer, go to shop, text:shop">Shop</a></li>
<li><a href="https://github.com/blog" data-ga-click="Footer, go to blog, text:blog">Blog</a></li>
<li><a href="https://github.com/about" data-ga-click="Footer, go to about, text:about">About</a></li>
</ul>
<a href="https://github.com" aria-label="Homepage">
<span class="mega-octicon octicon-mark-github" title="GitHub"></span>
</a>
<ul class="site-footer-links">
<li>&copy; 2015 <span title="0.05275s from github-fe119-cp1-prd.iad.github.net">GitHub</span>, Inc.</li>
<li><a href="https://github.com/site/terms" data-ga-click="Footer, go to terms, text:terms">Terms</a></li>
<li><a href="https://github.com/site/privacy" data-ga-click="Footer, go to privacy, text:privacy">Privacy</a></li>
<li><a href="https://github.com/security" data-ga-click="Footer, go to security, text:security">Security</a></li>
<li><a href="https://github.com/contact" data-ga-click="Footer, go to contact, text:contact">Contact</a></li>
</ul>
</div>
</div>
<div class="fullscreen-overlay js-fullscreen-overlay" id="fullscreen_overlay">
<div class="fullscreen-container js-suggester-container">
<div class="textarea-wrap">
<textarea name="fullscreen-contents" id="fullscreen-contents" class="fullscreen-contents js-fullscreen-contents" placeholder=""></textarea>
<div class="suggester-container">
<div class="suggester fullscreen-suggester js-suggester js-navigation-container"></div>
</div>
</div>
</div>
<div class="fullscreen-sidebar">
<a href="#" class="exit-fullscreen js-exit-fullscreen tooltipped tooltipped-w" aria-label="Exit Zen Mode">
<span class="mega-octicon octicon-screen-normal"></span>
</a>
<a href="#" class="theme-switcher js-theme-switcher tooltipped tooltipped-w"
aria-label="Switch themes">
<span class="octicon octicon-color-mode"></span>
</a>
</div>
</div>
<div id="ajax-error-message" class="flash flash-error">
<span class="octicon octicon-alert"></span>
<a href="#" class="octicon octicon-x flash-close js-ajax-error-dismiss" aria-label="Dismiss error"></a>
Something went wrong with that request. Please try again.
</div>
<script crossorigin="anonymous" src="https://assets-cdn.github.com/assets/frameworks-70c417717c6c19f325c76c40de062c2e005f8cfec564283d7818b5b0fe8c0d27.js"></script>
<script async="async" crossorigin="anonymous" src="https://assets-cdn.github.com/assets/github-9adb85255293205044bdded05300662b60a3fe712cb26ee7e5ca313a9f2ce3f7.js"></script>
</body>
</html>
<!DOCTYPE html>
<html lang="en" class="">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# object: http://ogp.me/ns/object# article: http://ogp.me/ns/article# profile: http://ogp.me/ns/profile#">
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Language" content="en">
<title>opencv/x_2.png at opencv_adding_plot · nmoutinho/opencv</title>
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub">
<link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub">
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-114.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-144.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144.png">
<meta property="fb:app_id" content="1401488693436528">
<meta content="@github" name="twitter:site" /><meta content="summary" name="twitter:card" /><meta content="nmoutinho/opencv" name="twitter:title" /><meta content="opencv - Open Source Computer Vision Library" name="twitter:description" /><meta content="https://avatars2.githubusercontent.com/u/9116444?v=3&amp;s=400" name="twitter:image:src" />
<meta content="GitHub" property="og:site_name" /><meta content="object" property="og:type" /><meta content="https://avatars2.githubusercontent.com/u/9116444?v=3&amp;s=400" property="og:image" /><meta content="nmoutinho/opencv" property="og:title" /><meta content="https://github.com/nmoutinho/opencv" property="og:url" /><meta content="opencv - Open Source Computer Vision Library" property="og:description" />
<meta name="browser-stats-url" content="/_stats">
<link rel="assets" href="https://assets-cdn.github.com/">
<link rel="conduit-xhr" href="https://ghconduit.com:25035">
<link rel="xhr-socket" href="/_sockets">
<meta name="pjax-timeout" content="1000">
<link rel="sudo-modal" href="/sessions/sudo_modal">
<meta name="msapplication-TileImage" content="/windows-tile.png">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="selected-link" value="repo_source" data-pjax-transient>
<meta name="google-analytics" content="UA-3769691-2">
<meta content="collector.githubapp.com" name="octolytics-host" /><meta content="collector-cdn.github.com" name="octolytics-script-host" /><meta content="github" name="octolytics-app-id" /><meta content="5972BB9A:7308:100EA50:550458EA" name="octolytics-dimension-request_id" /><meta content="9116444" name="octolytics-actor-id" /><meta content="nmoutinho" name="octolytics-actor-login" /><meta content="8f487c4d8d0c0bf24b8bc5bf2ca67f0ea7673ef10fd6803b34490272673097ad" name="octolytics-actor-hash" />
<meta content="Rails, view, blob#show" name="analytics-event" />
<link rel="icon" type="image/x-icon" href="https://assets-cdn.github.com/favicon.ico">
<meta content="authenticity_token" name="csrf-param" />
<meta content="3pF+oUCTT4Uf3eH7dtOHSkJlVLS2xtjZnpoUHaB90wsez9S+cEbOvs8ylfugjQeyexerZo9byjlQwa1gnS1tbA==" name="csrf-token" />
<link href="https://assets-cdn.github.com/assets/github-85e4ac99403eefa73664d9b122f27095fee8b7333e67f34fa34480ae497f7555.css" media="all" rel="stylesheet" />
<link href="https://assets-cdn.github.com/assets/github2-901780fdaaa6b0f56b2004899a7a24194bf4217cc7864291a9f68fa3a9264fdf.css" media="all" rel="stylesheet" />
<meta http-equiv="x-pjax-version" content="8060cc7a9543870628764b4fdb4264ea">
<meta name="description" content="opencv - Open Source Computer Vision Library">
<meta name="go-import" content="github.com/nmoutinho/opencv git https://github.com/nmoutinho/opencv.git">
<meta content="9116444" name="octolytics-dimension-user_id" /><meta content="nmoutinho" name="octolytics-dimension-user_login" /><meta content="31965147" name="octolytics-dimension-repository_id" /><meta content="nmoutinho/opencv" name="octolytics-dimension-repository_nwo" /><meta content="true" name="octolytics-dimension-repository_public" /><meta content="true" name="octolytics-dimension-repository_is_fork" /><meta content="5108051" name="octolytics-dimension-repository_parent_id" /><meta content="Itseez/opencv" name="octolytics-dimension-repository_parent_nwo" /><meta content="5108051" name="octolytics-dimension-repository_network_root_id" /><meta content="Itseez/opencv" name="octolytics-dimension-repository_network_root_nwo" />
<link href="https://github.com/nmoutinho/opencv/commits/opencv_adding_plot.atom" rel="alternate" title="Recent Commits to opencv:opencv_adding_plot" type="application/atom+xml">
</head>
<body class="logged_in env-production linux vis-public fork page-blob">
<a href="#start-of-content" tabindex="1" class="accessibility-aid js-skip-to-content">Skip to content</a>
<div class="wrapper">
<div class="header header-logged-in true" role="banner">
<div class="container clearfix">
<a class="header-logo-invertocat" href="https://github.com/" data-hotkey="g d" aria-label="Homepage" data-ga-click="Header, go to dashboard, icon:logo">
<span class="mega-octicon octicon-mark-github"></span>
</a>
<div class="site-search repo-scope js-site-search" role="search">
<form accept-charset="UTF-8" action="/nmoutinho/opencv/search" class="js-site-search-form" data-global-search-url="/search" data-repo-search-url="/nmoutinho/opencv/search" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /></div>
<input type="text"
class="js-site-search-field is-clearable"
data-hotkey="s"
name="q"
placeholder="Search"
data-global-scope-placeholder="Search GitHub"
data-repo-scope-placeholder="Search"
tabindex="1"
autocapitalize="off">
<div class="scope-badge">This repository</div>
</form>
</div>
<ul class="header-nav left" role="navigation">
<li class="header-nav-item explore">
<a class="header-nav-link" href="/explore" data-ga-click="Header, go to explore, text:explore">Explore</a>
</li>
<li class="header-nav-item">
<a class="header-nav-link" href="https://gist.github.com" data-ga-click="Header, go to gist, text:gist">Gist</a>
</li>
<li class="header-nav-item">
<a class="header-nav-link" href="/blog" data-ga-click="Header, go to blog, text:blog">Blog</a>
</li>
<li class="header-nav-item">
<a class="header-nav-link" href="https://help.github.com" data-ga-click="Header, go to help, text:help">Help</a>
</li>
</ul>
<ul class="header-nav user-nav right" id="user-links">
<li class="header-nav-item dropdown js-menu-container">
<a class="header-nav-link name" href="/nmoutinho" data-ga-click="Header, go to profile, text:username">
<img alt="Nuno Moutinho" class="avatar" data-user="9116444" height="20" src="https://avatars1.githubusercontent.com/u/9116444?v=3&amp;s=40" width="20" />
<span class="css-truncate">
<span class="css-truncate-target">nmoutinho</span>
</span>
</a>
</li>
<li class="header-nav-item dropdown js-menu-container">
<a class="header-nav-link js-menu-target tooltipped tooltipped-s" href="#" aria-label="Create new..." data-ga-click="Header, create new, icon:add">
<span class="octicon octicon-plus"></span>
<span class="dropdown-caret"></span>
</a>
<div class="dropdown-menu-content js-menu-content">
<ul class="dropdown-menu">
<li>
<a href="/new" data-ga-click="Header, create new repository, icon:repo"><span class="octicon octicon-repo"></span> New repository</a>
</li>
<li>
<a href="/organizations/new" data-ga-click="Header, create new organization, icon:organization"><span class="octicon octicon-organization"></span> New organization</a>
</li>
<li class="dropdown-divider"></li>
<li class="dropdown-header">
<span title="nmoutinho/opencv">This repository</span>
</li>
<li>
<a href="/nmoutinho/opencv/settings/collaboration" data-ga-click="Header, create new collaborator, icon:person"><span class="octicon octicon-person"></span> New collaborator</a>
</li>
</ul>
</div>
</li>
<li class="header-nav-item">
<a href="/notifications" aria-label="You have no unread notifications" class="header-nav-link notification-indicator tooltipped tooltipped-s" data-ga-click="Header, go to notifications, icon:read" data-hotkey="g n">
<span class="mail-status all-read"></span>
<span class="octicon octicon-inbox"></span>
</a>
</li>
<li class="header-nav-item">
<a class="header-nav-link tooltipped tooltipped-s" href="/settings/profile" id="account_settings" aria-label="Settings" data-ga-click="Header, go to settings, icon:settings">
<span class="octicon octicon-gear"></span>
</a>
</li>
<li class="header-nav-item">
<form accept-charset="UTF-8" action="/logout" class="logout-form" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="H28Q6+CIvwChuKRYvrKS+HJXGXuCHuIykMsj8x+6nwzd7xXHtrisB0jqT3cgNDO3KmP3caKspyGLcK82Ut5aAA==" /></div>
<button class="header-nav-link sign-out-button tooltipped tooltipped-s" aria-label="Sign out" data-ga-click="Header, sign out, icon:logout">
<span class="octicon octicon-sign-out"></span>
</button>
</form> </li>
</ul>
</div>
</div>
<div id="start-of-content" class="accessibility-aid"></div>
<div class="site" itemscope itemtype="http://schema.org/WebPage">
<div id="js-flash-container">
</div>
<div class="pagehead repohead instapaper_ignore readability-menu">
<div class="container">
<ul class="pagehead-actions">
<li>
<form accept-charset="UTF-8" action="/notifications/subscribe" class="js-social-container" data-autosubmit="true" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="p3qKyoBZ6AQqn//tzMMIgShMySGQNa7NEi175r1bdOIIxh1ntCh0Sm84iNooKdVDPPywwwPIT/FOEJsIdxdlPQ==" /></div> <input id="repository_id" name="repository_id" type="hidden" value="31965147" />
<div class="select-menu js-menu-container js-select-menu">
<a href="/nmoutinho/opencv/subscription"
class="minibutton select-menu-button with-count js-menu-target" role="button" tabindex="0" aria-haspopup="true"
data-ga-click="Repository, click Watch settings, action:blob#show">
<span class="js-select-button">
<span class="octicon octicon-eye"></span>
Unwatch
</span>
</a>
<a class="social-count js-social-count" href="/nmoutinho/opencv/watchers">
1
</a>
<div class="select-menu-modal-holder">
<div class="select-menu-modal subscription-menu-modal js-menu-content" aria-hidden="true">
<div class="select-menu-header">
<span class="select-menu-title">Notifications</span>
<span class="octicon octicon-x js-menu-close" role="button" aria-label="Close"></span>
</div>
<div class="select-menu-list js-navigation-container" role="menu">
<div class="select-menu-item js-navigation-item " role="menuitem" tabindex="0">
<span class="select-menu-item-icon octicon octicon-check"></span>
<div class="select-menu-item-text">
<input id="do_included" name="do" type="radio" value="included" />
<span class="select-menu-item-heading">Not watching</span>
<span class="description">Be notified when participating or @mentioned.</span>
<span class="js-select-button-text hidden-select-button-text">
<span class="octicon octicon-eye"></span>
Watch
</span>
</div>
</div>
<div class="select-menu-item js-navigation-item selected" role="menuitem" tabindex="0">
<span class="select-menu-item-icon octicon octicon octicon-check"></span>
<div class="select-menu-item-text">
<input checked="checked" id="do_subscribed" name="do" type="radio" value="subscribed" />
<span class="select-menu-item-heading">Watching</span>
<span class="description">Be notified of all conversations.</span>
<span class="js-select-button-text hidden-select-button-text">
<span class="octicon octicon-eye"></span>
Unwatch
</span>
</div>
</div>
<div class="select-menu-item js-navigation-item " role="menuitem" tabindex="0">
<span class="select-menu-item-icon octicon octicon-check"></span>
<div class="select-menu-item-text">
<input id="do_ignore" name="do" type="radio" value="ignore" />
<span class="select-menu-item-heading">Ignoring</span>
<span class="description">Never be notified.</span>
<span class="js-select-button-text hidden-select-button-text">
<span class="octicon octicon-mute"></span>
Stop ignoring
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</li>
<li>
<div class="js-toggler-container js-social-container starring-container ">
<form accept-charset="UTF-8" action="/nmoutinho/opencv/unstar" class="js-toggler-form starred js-unstar-button" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="719rKgnL2LurrGmmrl0T+8hK65/tvP3d5Q5i+ndL/mtHgcLU6f4IfBzXyy38JNe3R96qDHl9WeN/qkk/7+19rA==" /></div>
<button
class="minibutton with-count js-toggler-target"
aria-label="Unstar this repository" title="Unstar nmoutinho/opencv"
data-ga-click="Repository, click unstar button, action:blob#show; text:Unstar">
<span class="octicon octicon-star"></span>
Unstar
</button>
<a class="social-count js-social-count" href="/nmoutinho/opencv/stargazers">
0
</a>
</form>
<form accept-charset="UTF-8" action="/nmoutinho/opencv/star" class="js-toggler-form unstarred js-star-button" data-remote="true" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="y45m3qFd9BDNH4oPNte6s/iqm9jhs9K0u6oNLDHsmtiRQzYAUFiqfZm9rDcF4w0a6znRq9sL/wYArU415wQkuA==" /></div>
<button
class="minibutton with-count js-toggler-target"
aria-label="Star this repository" title="Star nmoutinho/opencv"
data-ga-click="Repository, click star button, action:blob#show; text:Star">
<span class="octicon octicon-star"></span>
Star
</button>
<a class="social-count js-social-count" href="/nmoutinho/opencv/stargazers">
0
</a>
</form> </div>
</li>
<li>
<a href="#fork-destination-box" class="minibutton with-count"
title="Fork your own copy of nmoutinho/opencv to your account"
aria-label="Fork your own copy of nmoutinho/opencv to your account"
rel="facebox"
data-ga-click="Repository, show fork modal, action:blob#show; text:Fork">
<span class="octicon octicon-repo-forked"></span>
Fork
</a>
<a href="/nmoutinho/opencv/network" class="social-count">4,317</a>
<div id="fork-destination-box" style="display: none;">
<h2 class="facebox-header">Where should we fork this repository?</h2>
<include-fragment src=""
class="js-fork-select-fragment fork-select-fragment"
data-url="/nmoutinho/opencv/fork?fragment=1">
<img alt="Loading" height="64" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-128-338974454bb5c32803e82f601beb051d373744b024fe8742a76009700fd7e033.gif" width="64" />
</include-fragment>
</div>
</li>
</ul>
<h1 itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="entry-title public">
<span class="mega-octicon octicon-repo-forked"></span>
<span class="author"><a href="/nmoutinho" class="url fn" itemprop="url" rel="author"><span itemprop="title">nmoutinho</span></a></span><!--
--><span class="path-divider">/</span><!--
--><strong><a href="/nmoutinho/opencv" class="js-current-repository" data-pjax="#js-repo-pjax-container">opencv</a></strong>
<span class="page-context-loader">
<img alt="" height="16" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-32-e513294efa576953719e4e2de888dd9cf929b7d62ed8d05f25e731d02452ab6c.gif" width="16" />
</span>
<span class="fork-flag">
<span class="text">forked from <a href="/Itseez/opencv">Itseez/opencv</a></span>
</span>
</h1>
</div><!-- /.container -->
</div><!-- /.repohead -->
<div class="container">
<div class="repository-with-sidebar repo-container new-discussion-timeline ">
<div class="repository-sidebar clearfix">
<nav class="sunken-menu repo-nav js-repo-nav js-sidenav-container-pjax js-octicon-loaders"
role="navigation"
data-pjax="#js-repo-pjax-container"
data-issue-count-url="/nmoutinho/opencv/issues/counts">
<ul class="sunken-menu-group">
<li class="tooltipped tooltipped-w" aria-label="Code">
<a href="/nmoutinho/opencv/tree/opencv_adding_plot" aria-label="Code" class="selected js-selected-navigation-item sunken-menu-item" data-hotkey="g c" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches /nmoutinho/opencv/tree/opencv_adding_plot">
<span class="octicon octicon-code"></span> <span class="full-word">Code</span>
<img alt="" class="mini-loader" height="16" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-32-e513294efa576953719e4e2de888dd9cf929b7d62ed8d05f25e731d02452ab6c.gif" width="16" />
</a> </li>
<li class="tooltipped tooltipped-w" aria-label="Pull Requests">
<a href="/nmoutinho/opencv/pulls" aria-label="Pull Requests" class="js-selected-navigation-item sunken-menu-item" data-hotkey="g p" data-selected-links="repo_pulls /nmoutinho/opencv/pulls">
<span class="octicon octicon-git-pull-request"></span> <span class="full-word">Pull Requests</span>
<span class="js-pull-replace-counter"></span>
<img alt="" class="mini-loader" height="16" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-32-e513294efa576953719e4e2de888dd9cf929b7d62ed8d05f25e731d02452ab6c.gif" width="16" />
</a> </li>
</ul>
<div class="sunken-menu-separator"></div>
<ul class="sunken-menu-group">
<li class="tooltipped tooltipped-w" aria-label="Pulse">
<a href="/nmoutinho/opencv/pulse" aria-label="Pulse" class="js-selected-navigation-item sunken-menu-item" data-selected-links="pulse /nmoutinho/opencv/pulse">
<span class="octicon octicon-pulse"></span> <span class="full-word">Pulse</span>
<img alt="" class="mini-loader" height="16" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-32-e513294efa576953719e4e2de888dd9cf929b7d62ed8d05f25e731d02452ab6c.gif" width="16" />
</a> </li>
<li class="tooltipped tooltipped-w" aria-label="Graphs">
<a href="/nmoutinho/opencv/graphs" aria-label="Graphs" class="js-selected-navigation-item sunken-menu-item" data-selected-links="repo_graphs repo_contributors /nmoutinho/opencv/graphs">
<span class="octicon octicon-graph"></span> <span class="full-word">Graphs</span>
<img alt="" class="mini-loader" height="16" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-32-e513294efa576953719e4e2de888dd9cf929b7d62ed8d05f25e731d02452ab6c.gif" width="16" />
</a> </li>
</ul>
<div class="sunken-menu-separator"></div>
<ul class="sunken-menu-group">
<li class="tooltipped tooltipped-w" aria-label="Settings">
<a href="/nmoutinho/opencv/settings" aria-label="Settings" class="js-selected-navigation-item sunken-menu-item" data-selected-links="repo_settings /nmoutinho/opencv/settings">
<span class="octicon octicon-tools"></span> <span class="full-word">Settings</span>
<img alt="" class="mini-loader" height="16" src="https://assets-cdn.github.com/assets/spinners/octocat-spinner-32-e513294efa576953719e4e2de888dd9cf929b7d62ed8d05f25e731d02452ab6c.gif" width="16" />
</a> </li>
</ul>
</nav>
<div class="only-with-full-nav">
<div class="clone-url open"
data-protocol-type="http"
data-url="/users/set_protocol?protocol_selector=http&amp;protocol_type=clone">
<h3><span class="text-emphasized">HTTPS</span> clone URL</h3>
<div class="input-group js-zeroclipboard-container">
<input type="text" class="input-mini input-monospace js-url-field js-zeroclipboard-target"
value="https://github.com/nmoutinho/opencv.git" readonly="readonly">
<span class="input-group-button">
<button aria-label="Copy to clipboard" class="js-zeroclipboard minibutton zeroclipboard-button" data-copied-hint="Copied!" type="button"><span class="octicon octicon-clippy"></span></button>
</span>
</div>
</div>
<div class="clone-url "
data-protocol-type="ssh"
data-url="/users/set_protocol?protocol_selector=ssh&amp;protocol_type=clone">
<h3><span class="text-emphasized">SSH</span> clone URL</h3>
<div class="input-group js-zeroclipboard-container">
<input type="text" class="input-mini input-monospace js-url-field js-zeroclipboard-target"
value="git@github.com:nmoutinho/opencv.git" readonly="readonly">
<span class="input-group-button">
<button aria-label="Copy to clipboard" class="js-zeroclipboard minibutton zeroclipboard-button" data-copied-hint="Copied!" type="button"><span class="octicon octicon-clippy"></span></button>
</span>
</div>
</div>
<div class="clone-url "
data-protocol-type="subversion"
data-url="/users/set_protocol?protocol_selector=subversion&amp;protocol_type=clone">
<h3><span class="text-emphasized">Subversion</span> checkout URL</h3>
<div class="input-group js-zeroclipboard-container">
<input type="text" class="input-mini input-monospace js-url-field js-zeroclipboard-target"
value="https://github.com/nmoutinho/opencv" readonly="readonly">
<span class="input-group-button">
<button aria-label="Copy to clipboard" class="js-zeroclipboard minibutton zeroclipboard-button" data-copied-hint="Copied!" type="button"><span class="octicon octicon-clippy"></span></button>
</span>
</div>
</div>
<p class="clone-options">You can clone with
<a href="#" class="js-clone-selector" data-protocol="http">HTTPS</a>, <a href="#" class="js-clone-selector" data-protocol="ssh">SSH</a>, or <a href="#" class="js-clone-selector" data-protocol="subversion">Subversion</a>.
<a href="https://help.github.com/articles/which-remote-url-should-i-use" class="help tooltipped tooltipped-n" aria-label="Get help on which URL is right for you.">
<span class="octicon octicon-question"></span>
</a>
</p>
<a href="/nmoutinho/opencv/archive/opencv_adding_plot.zip"
class="minibutton sidebar-button"
aria-label="Download the contents of nmoutinho/opencv as a zip file"
title="Download the contents of nmoutinho/opencv as a zip file"
rel="nofollow">
<span class="octicon octicon-cloud-download"></span>
Download ZIP
</a>
</div>
</div><!-- /.repository-sidebar -->
<div id="js-repo-pjax-container" class="repository-content context-loader-container" data-pjax-container>
<a href="/nmoutinho/opencv/blob/8599c9e4921a18f7344413e1b79757a792c71b25/modules/plot/doc/images/x_2.png" class="hidden js-permalink-shortcut" data-hotkey="y">Permalink</a>
<!-- blob contrib key: blob_contributors:v21:1fec3e0d602a11b4dddd5f0cf2a6ba62 -->
<div class="file-navigation js-zeroclipboard-container">
<div class="select-menu js-menu-container js-select-menu left">
<span class="minibutton select-menu-button js-menu-target css-truncate" data-hotkey="w"
data-master-branch="master"
data-ref="opencv_adding_plot"
title="opencv_adding_plot"
role="button" aria-label="Switch branches or tags" tabindex="0" aria-haspopup="true">
<span class="octicon octicon-git-branch"></span>
<i>branch:</i>
<span class="js-select-button css-truncate-target">opencv_adding_…</span>
</span>
<div class="select-menu-modal-holder js-menu-content js-navigation-container" data-pjax aria-hidden="true">
<div class="select-menu-modal">
<div class="select-menu-header">
<span class="select-menu-title">Switch branches/tags</span>
<span class="octicon octicon-x js-menu-close" role="button" aria-label="Close"></span>
</div>
<div class="select-menu-filters">
<div class="select-menu-text-filter">
<input type="text" aria-label="Find or create a branch…" id="context-commitish-filter-field" class="js-filterable-field js-navigation-enable" placeholder="Find or create a branch…">
</div>
<div class="select-menu-tabs">
<ul>
<li class="select-menu-tab">
<a href="#" data-tab-filter="branches" data-filter-placeholder="Find or create a branch…" class="js-select-menu-tab">Branches</a>
</li>
<li class="select-menu-tab">
<a href="#" data-tab-filter="tags" data-filter-placeholder="Find a tag…" class="js-select-menu-tab">Tags</a>
</li>
</ul>
</div>
</div>
<div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="branches">
<div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring">
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/nmoutinho/opencv/blob/2.4/modules/plot/doc/images/x_2.png"
data-name="2.4"
data-skip-pjax="true"
rel="nofollow">
<span class="select-menu-item-icon octicon octicon-check"></span>
<span class="select-menu-item-text css-truncate-target" title="2.4">
2.4
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/nmoutinho/opencv/blob/2.4.8.x-prep/modules/plot/doc/images/x_2.png"
data-name="2.4.8.x-prep"
data-skip-pjax="true"
rel="nofollow">
<span class="select-menu-item-icon octicon octicon-check"></span>
<span class="select-menu-item-text css-truncate-target" title="2.4.8.x-prep">
2.4.8.x-prep
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/nmoutinho/opencv/blob/2.4.9.x-prep/modules/plot/doc/images/x_2.png"
data-name="2.4.9.x-prep"
data-skip-pjax="true"
rel="nofollow">
<span class="select-menu-item-icon octicon octicon-check"></span>
<span class="select-menu-item-text css-truncate-target" title="2.4.9.x-prep">
2.4.9.x-prep
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/nmoutinho/opencv/blob/2.4.10.x-prep/modules/plot/doc/images/x_2.png"
data-name="2.4.10.x-prep"
data-skip-pjax="true"
rel="nofollow">
<span class="select-menu-item-icon octicon octicon-check"></span>
<span class="select-menu-item-text css-truncate-target" title="2.4.10.x-prep">
2.4.10.x-prep
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open "
href="/nmoutinho/opencv/blob/master/modules/plot/doc/images/x_2.png"
data-name="master"
data-skip-pjax="true"
rel="nofollow">
<span class="select-menu-item-icon octicon octicon-check"></span>
<span class="select-menu-item-text css-truncate-target" title="master">
master
</span>
</a>
<a class="select-menu-item js-navigation-item js-navigation-open selected"
href="/nmoutinho/opencv/blob/opencv_adding_plot/modules/plot/doc/images/x_2.png"
data-name="opencv_adding_plot"
data-skip-pjax="true"
rel="nofollow">
<span class="select-menu-item-icon octicon octicon-check"></span>
<span class="select-menu-item-text css-truncate-target" title="opencv_adding_plot">
opencv_adding_plot
</span>
</a>
</div>
<form accept-charset="UTF-8" action="/nmoutinho/opencv/branches" class="js-create-branch select-menu-item select-menu-new-item-form js-navigation-item js-new-item-form" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="Yx0geHffKr8lRBL8TlTHJUvs0JMHaokX4/kgoqiT6aXUJ6jRRt+L6n6ZvzEGk9hGRw6mnRt7X8R5sjaswA/9sQ==" /></div>
<span class="octicon octicon-git-branch select-menu-item-icon"></span>
<div class="select-menu-item-text">
<span class="select-menu-item-heading">Create branch: <span class="js-new-item-name"></span></span>
<span class="description">from ‘opencv_adding_plot’</span>
</div>
<input type="hidden" name="name" id="name" class="js-new-item-value">
<input type="hidden" name="branch" id="branch" value="opencv_adding_plot">
<input type="hidden" name="path" id="path" value="modules/plot/doc/images/x_2.png">
</form>
</div>
<div class="select-menu-list select-menu-tab-bucket js-select-menu-tab-bucket" data-tab-filter="tags">
<div data-filterable-for="context-commitish-filter-field" data-filterable-type="substring">
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/perf4au/modules/plot/doc/images/x_2.png"
data-name="perf4au"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="perf4au">perf4au</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/carma_release.0.0.1/modules/plot/doc/images/x_2.png"
data-name="carma_release.0.0.1"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="carma_release.0.0.1">carma_release.0.0.1</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/3.0-ocl-tp2/modules/plot/doc/images/x_2.png"
data-name="3.0-ocl-tp2"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="3.0-ocl-tp2">3.0-ocl-tp2</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/3.0-ocl-tech-preview/modules/plot/doc/images/x_2.png"
data-name="3.0-ocl-tech-preview"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="3.0-ocl-tech-preview">3.0-ocl-tech-preview</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/3.0.0-beta/modules/plot/doc/images/x_2.png"
data-name="3.0.0-beta"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="3.0.0-beta">3.0.0-beta</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/3.0.0-alpha/modules/plot/doc/images/x_2.png"
data-name="3.0.0-alpha"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="3.0.0-alpha">3.0.0-alpha</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.11/modules/plot/doc/images/x_2.png"
data-name="2.4.11"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.11">2.4.11</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.10.1/modules/plot/doc/images/x_2.png"
data-name="2.4.10.1"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.10.1">2.4.10.1</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.10/modules/plot/doc/images/x_2.png"
data-name="2.4.10"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.10">2.4.10</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.9.1/modules/plot/doc/images/x_2.png"
data-name="2.4.9.1"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.9.1">2.4.9.1</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.9/modules/plot/doc/images/x_2.png"
data-name="2.4.9"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.9">2.4.9</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.8.3/modules/plot/doc/images/x_2.png"
data-name="2.4.8.3"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.8.3">2.4.8.3</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.8.2/modules/plot/doc/images/x_2.png"
data-name="2.4.8.2"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.8.2">2.4.8.2</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.8.1/modules/plot/doc/images/x_2.png"
data-name="2.4.8.1"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.8.1">2.4.8.1</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.8/modules/plot/doc/images/x_2.png"
data-name="2.4.8"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.8">2.4.8</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.7-rc1/modules/plot/doc/images/x_2.png"
data-name="2.4.7-rc1"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.7-rc1">2.4.7-rc1</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.7.2/modules/plot/doc/images/x_2.png"
data-name="2.4.7.2"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.7.2">2.4.7.2</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.7.1/modules/plot/doc/images/x_2.png"
data-name="2.4.7.1"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.7.1">2.4.7.1</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.7/modules/plot/doc/images/x_2.png"
data-name="2.4.7"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.7">2.4.7</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.6.2-rc1/modules/plot/doc/images/x_2.png"
data-name="2.4.6.2-rc1"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.6.2-rc1">2.4.6.2-rc1</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.6.2r3/modules/plot/doc/images/x_2.png"
data-name="2.4.6.2r3"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.6.2r3">2.4.6.2r3</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.6.2r2/modules/plot/doc/images/x_2.png"
data-name="2.4.6.2r2"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.6.2r2">2.4.6.2r2</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.6.2/modules/plot/doc/images/x_2.png"
data-name="2.4.6.2"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.6.2">2.4.6.2</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.6.1/modules/plot/doc/images/x_2.png"
data-name="2.4.6.1"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.6.1">2.4.6.1</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.6/modules/plot/doc/images/x_2.png"
data-name="2.4.6"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.6">2.4.6</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.5/modules/plot/doc/images/x_2.png"
data-name="2.4.5"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.5">2.4.5</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.4-beta/modules/plot/doc/images/x_2.png"
data-name="2.4.4-beta"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.4-beta">2.4.4-beta</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.4/modules/plot/doc/images/x_2.png"
data-name="2.4.4"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.4">2.4.4</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.3-rc/modules/plot/doc/images/x_2.png"
data-name="2.4.3-rc"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.3-rc">2.4.3-rc</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.3.2/modules/plot/doc/images/x_2.png"
data-name="2.4.3.2"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.3.2">2.4.3.2</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.3.1/modules/plot/doc/images/x_2.png"
data-name="2.4.3.1"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.3.1">2.4.3.1</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.3/modules/plot/doc/images/x_2.png"
data-name="2.4.3"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.3">2.4.3</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.2/modules/plot/doc/images/x_2.png"
data-name="2.4.2"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.2">2.4.2</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.1/modules/plot/doc/images/x_2.png"
data-name="2.4.1"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.1">2.4.1</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.4.0/modules/plot/doc/images/x_2.png"
data-name="2.4.0"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.4.0">2.4.0</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.3.1/modules/plot/doc/images/x_2.png"
data-name="2.3.1"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.3.1">2.3.1</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.3.0/modules/plot/doc/images/x_2.png"
data-name="2.3.0"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.3.0">2.3.0</a>
</div>
<div class="select-menu-item js-navigation-item ">
<span class="select-menu-item-icon octicon octicon-check"></span>
<a href="/nmoutinho/opencv/tree/2.2/modules/plot/doc/images/x_2.png"
data-name="2.2"
data-skip-pjax="true"
rel="nofollow"
class="js-navigation-open select-menu-item-text css-truncate-target"
title="2.2">2.2</a>
</div>
</div>
<div class="select-menu-no-results">Nothing to show</div>
</div>
</div>
</div>
</div>
<div class="button-group right">
<a href="/nmoutinho/opencv/find/opencv_adding_plot"
class="js-show-file-finder minibutton empty-icon tooltipped tooltipped-s"
data-pjax
data-hotkey="t"
aria-label="Quickly jump between files">
<span class="octicon octicon-list-unordered"></span>
</a>
<button aria-label="Copy file path to clipboard" class="js-zeroclipboard minibutton zeroclipboard-button" data-copied-hint="Copied!" type="button"><span class="octicon octicon-clippy"></span></button>
</div>
<div class="breadcrumb js-zeroclipboard-target">
<span class='repo-root js-repo-root'><span itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"><a href="/nmoutinho/opencv/tree/opencv_adding_plot" class="" data-branch="opencv_adding_plot" data-direction="back" data-pjax="true" itemscope="url"><span itemprop="title">opencv</span></a></span></span><span class="separator">/</span><span itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"><a href="/nmoutinho/opencv/tree/opencv_adding_plot/modules" class="" data-branch="opencv_adding_plot" data-direction="back" data-pjax="true" itemscope="url"><span itemprop="title">modules</span></a></span><span class="separator">/</span><span itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"><a href="/nmoutinho/opencv/tree/opencv_adding_plot/modules/plot" class="" data-branch="opencv_adding_plot" data-direction="back" data-pjax="true" itemscope="url"><span itemprop="title">plot</span></a></span><span class="separator">/</span><span itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"><a href="/nmoutinho/opencv/tree/opencv_adding_plot/modules/plot/doc" class="" data-branch="opencv_adding_plot" data-direction="back" data-pjax="true" itemscope="url"><span itemprop="title">doc</span></a></span><span class="separator">/</span><span itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"><a href="/nmoutinho/opencv/tree/opencv_adding_plot/modules/plot/doc/images" class="" data-branch="opencv_adding_plot" data-direction="back" data-pjax="true" itemscope="url"><span itemprop="title">images</span></a></span><span class="separator">/</span><strong class="final-path">x_2.png</strong>
</div>
</div>
<div class="commit file-history-tease">
<div class="file-history-tease-header">
<img alt="Nuno Moutinho" class="avatar" data-user="9116444" height="24" src="https://avatars3.githubusercontent.com/u/9116444?v=3&amp;s=48" width="24" />
<span class="author"><a href="/nmoutinho" rel="author">nmoutinho</a></span>
<time datetime="2015-03-11T19:51:14Z" is="relative-time">Mar 11, 2015</time>
<div class="commit-title">
<a href="/nmoutinho/opencv/commit/5d670834abd156d553196dc99c8d5bc2f9a45c26" class="message" data-pjax="true" title="Created a Plot class which allows you to easily plot data from a Mat or an std::vector. You can plot 1D or 2D plots, change the window size and the axis limits. Whitespace errors were corrected.">Created a Plot class which allows you to easily plot data from a Mat …</a>
</div>
</div>
<div class="participation">
<p class="quickstat">
<a href="#blob_contributors_box" rel="facebox">
<strong>1</strong>
contributor
</a>
</p>
</div>
<div id="blob_contributors_box" style="display:none">
<h2 class="facebox-header">Users who have contributed to this file</h2>
<ul class="facebox-user-list">
<li class="facebox-user-list-item">
<img alt="Nuno Moutinho" data-user="9116444" height="24" src="https://avatars3.githubusercontent.com/u/9116444?v=3&amp;s=48" width="24" />
<a href="/nmoutinho">nmoutinho</a>
</li>
</ul>
</div>
</div>
<div class="file">
<div class="file-header">
<div class="file-actions">
<div class="button-group">
<a href="/nmoutinho/opencv/raw/opencv_adding_plot/modules/plot/doc/images/x_2.png" class="minibutton " id="raw-url">Raw</a>
<a href="/nmoutinho/opencv/commits/opencv_adding_plot/modules/plot/doc/images/x_2.png" class="minibutton " rel="nofollow">History</a>
</div><!-- /.button-group -->
<form accept-charset="UTF-8" action="/nmoutinho/opencv/delete/opencv_adding_plot/modules/plot/doc/images/x_2.png" aria-label="Delete this file" class="tooltipped tooltipped-s inline-form delete-file-form" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="9Gd8kH+p07fL/j73B9UfzEkd5xJzIVzDeIpwRVqnEalzlIq1dgPf+gaUmiHe3Fe5PS99z/U1A7LYLkwIKpJNcw==" /></div>
<button class="web-edit-button"
type="submit"
data-disable-with>
<span class="octicon octicon-trashcan "></span>
</button>
</form> </a>
</div><!-- /.actions -->
<div class="file-info">
61.481 kb
</div>
</div>
<div class="blob-wrapper data type-text">
<div class="image">
<span class="border-wrap"><img src="/nmoutinho/opencv/blob/opencv_adding_plot/modules/plot/doc/images/x_2.png?raw=true" alt="x_2.png"></span>
</div>
</div>
</div>
<a href="#jump-to-line" rel="facebox[.linejump]" data-hotkey="l" style="display:none">Jump to Line</a>
<div id="jump-to-line" style="display:none">
<form accept-charset="UTF-8" class="js-jump-to-line-form">
<input class="linejump-input js-jump-to-line-field" type="text" placeholder="Jump to line&hellip;" autofocus>
<button type="submit" class="button">Go</button>
</form>
</div>
</div>
</div><!-- /.repo-container -->
<div class="modal-backdrop"></div>
</div><!-- /.container -->
</div><!-- /.site -->
</div><!-- /.wrapper -->
<div class="container">
<div class="site-footer" role="contentinfo">
<ul class="site-footer-links right">
<li><a href="https://status.github.com/" data-ga-click="Footer, go to status, text:status">Status</a></li>
<li><a href="https://developer.github.com" data-ga-click="Footer, go to api, text:api">API</a></li>
<li><a href="https://training.github.com" data-ga-click="Footer, go to training, text:training">Training</a></li>
<li><a href="https://shop.github.com" data-ga-click="Footer, go to shop, text:shop">Shop</a></li>
<li><a href="https://github.com/blog" data-ga-click="Footer, go to blog, text:blog">Blog</a></li>
<li><a href="https://github.com/about" data-ga-click="Footer, go to about, text:about">About</a></li>
</ul>
<a href="https://github.com" aria-label="Homepage">
<span class="mega-octicon octicon-mark-github" title="GitHub"></span>
</a>
<ul class="site-footer-links">
<li>&copy; 2015 <span title="0.04647s from github-fe132-cp1-prd.iad.github.net">GitHub</span>, Inc.</li>
<li><a href="https://github.com/site/terms" data-ga-click="Footer, go to terms, text:terms">Terms</a></li>
<li><a href="https://github.com/site/privacy" data-ga-click="Footer, go to privacy, text:privacy">Privacy</a></li>
<li><a href="https://github.com/security" data-ga-click="Footer, go to security, text:security">Security</a></li>
<li><a href="https://github.com/contact" data-ga-click="Footer, go to contact, text:contact">Contact</a></li>
</ul>
</div>
</div>
<div class="fullscreen-overlay js-fullscreen-overlay" id="fullscreen_overlay">
<div class="fullscreen-container js-suggester-container">
<div class="textarea-wrap">
<textarea name="fullscreen-contents" id="fullscreen-contents" class="fullscreen-contents js-fullscreen-contents" placeholder=""></textarea>
<div class="suggester-container">
<div class="suggester fullscreen-suggester js-suggester js-navigation-container"></div>
</div>
</div>
</div>
<div class="fullscreen-sidebar">
<a href="#" class="exit-fullscreen js-exit-fullscreen tooltipped tooltipped-w" aria-label="Exit Zen Mode">
<span class="mega-octicon octicon-screen-normal"></span>
</a>
<a href="#" class="theme-switcher js-theme-switcher tooltipped tooltipped-w"
aria-label="Switch themes">
<span class="octicon octicon-color-mode"></span>
</a>
</div>
</div>
<div id="ajax-error-message" class="flash flash-error">
<span class="octicon octicon-alert"></span>
<a href="#" class="octicon octicon-x flash-close js-ajax-error-dismiss" aria-label="Dismiss error"></a>
Something went wrong with that request. Please try again.
</div>
<script crossorigin="anonymous" src="https://assets-cdn.github.com/assets/frameworks-70c417717c6c19f325c76c40de062c2e005f8cfec564283d7818b5b0fe8c0d27.js"></script>
<script async="async" crossorigin="anonymous" src="https://assets-cdn.github.com/assets/github-9adb85255293205044bdded05300662b60a3fe712cb26ee7e5ca313a9f2ce3f7.js"></script>
</body>
</html>
Plot Module Overview
====================
This Plot module allows you to easily plot data in 1D or 2D. You can change the size of the window, the limits of the axis and the colors of each element. You can also show in real time the plot you are building or save the plot as an image (png).
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009-2012, Willow Garage Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
//################################################################################
//
// Created by Nuno Moutinho
//
//################################################################################
#ifndef _OPENCV_PLOT_H_
#define _OPENCV_PLOT_H_
#ifdef __cplusplus
#include <opencv2/core.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <vector>
#include <iostream>
#include <stdio.h>
///This plot class allows you to easily plot data from a Mat or a vector. You can plot 1D or 2D plots, change the window size and the axis limits. It's simple yet very effective and usefull.
namespace cv
{
class CV_EXPORTS Plot
{
protected:
cv::Mat plotDataX;
cv::Mat plotDataY;
cv::Mat plotDataX_plusZero;
cv::Mat plotDataY_plusZero;
const char * plotName;
///dimensions and limits of the plot
int plotSizeWidth;
int plotSizeHeight;
double plotMinX;
double plotMaxX;
double plotMinY;
double plotMaxY;
double plotMinX_plusZero;
double plotMaxX_plusZero;
double plotMinY_plusZero;
double plotMaxY_plusZero;
int plotLineWidth;
///colors of each plot element
cv::Scalar plotLineColor;
cv::Scalar plotBackgroundColor;
cv::Scalar plotAxisColor;
cv::Scalar plotGridColor;
cv::Scalar plotTextColor;
///the final plot result
cv::Mat plotResult;
public:
///constructor accepting only Y data to be plotted
Plot(cv::Mat _plotData)
{
//if the matrix is not Nx1 or 1xN
if(_plotData.cols > 1 && _plotData.rows > 1)
{
std::cout << "ERROR: Plot data must be a 1xN or Nx1 matrix." << std::endl;
exit(0);
}
//if the matrix type is not CV_64F
if(_plotData.type() != CV_64F)
{
std::cout << "ERROR: Plot data type must be double (CV_64F)." << std::endl;
exit(0);
}
//in case we have a row matrix than needs to be transposed
if(_plotData.cols > _plotData.rows)
{
_plotData = _plotData.t();
}
plotDataY=_plotData;
plotDataX = plotDataY*0;
for (int i=0; i<plotDataY.rows; i++)
{
plotDataX.at<double>(i,0) = i;
}
///calling the main constructor
plotHelper(plotDataX, plotDataY);
}
///constructor accepting X data and Y data to be plotted
Plot(cv::Mat _plotDataX, cv::Mat _plotDataY)
{
//f the matrix is not Nx1 or 1xN
if(_plotDataX.cols > 1 && _plotDataX.rows > 1 || _plotDataY.cols > 1 && _plotDataY.rows > 1)
{
std::cout << "ERROR: Plot data must be a 1xN or Nx1 matrix." << std::endl;
exit(0);
}
//if the matrix type is not CV_64F
if(_plotDataX.type() != CV_64F || _plotDataY.type() != CV_64F)
{
std::cout << "ERROR: Plot data type must be double (CV_64F)." << std::endl;
exit(0);
}
//in case we have a row matrix than needs to be transposed
if(_plotDataX.cols > _plotDataX.rows)
{
_plotDataX = _plotDataX.t();
}
if(_plotDataY.cols > _plotDataY.rows)
{
_plotDataY = _plotDataY.t();
}
plotHelper(_plotDataX, _plotDataY);
}
///set functions
void setMinX(double _plotMinX)
{
plotMinX = _plotMinX;
plotMinX_plusZero = _plotMinX;
}
void setMaxX(double _plotMaxX)
{
plotMaxX = _plotMaxX;
plotMaxX_plusZero = _plotMaxX;
}
void setMinY(double _plotMinY)
{
plotMinY = _plotMinY;
plotMinY_plusZero = _plotMinY;
}
void setMaxY(double _plotMaxY)
{
plotMaxY = _plotMaxY;
plotMaxY_plusZero = _plotMaxY;
}
void setPlotLineWidth(int _plotLineWidth)
{
plotLineWidth=_plotLineWidth;
}
void setPlotLineColor(cv::Scalar _plotLineColor)
{
plotLineColor=_plotLineColor;
}
void setPlotBackgroundColor(cv::Scalar _plotBackgroundColor)
{
plotBackgroundColor=_plotBackgroundColor;
}
void setPlotAxisColor(cv::Scalar _plotAxisColor)
{
plotAxisColor=_plotAxisColor;
}
void setPlotGridColor(cv::Scalar _plotGridColor)
{
plotGridColor=_plotGridColor;
}
void setPlotTextColor(cv::Scalar _plotTextColor)
{
plotTextColor=_plotTextColor;
}
void setPlotSize(int _plotSizeWidth, int _plotSizeHeight)
{
if(_plotSizeWidth > 400)
plotSizeWidth = _plotSizeWidth;
else
plotSizeWidth = 400;
if(_plotSizeHeight > 300)
plotSizeHeight = _plotSizeHeight;
else
plotSizeHeight = 300;
}
///render the plotResult to a Mat
void render(cv::Mat &_plotResult);
///show the plotResult from within the class
void show(const char * _plotName);
///save the plotResult as a .png image
void save(const char * _plotFileName);
protected:
///a helper method to be used in the constructor
void plotHelper(cv::Mat _plotDataX, cv::Mat _plotDataY)
{
plotDataX=_plotDataX;
plotDataY=_plotDataY;
int NumVecElements = plotDataX.rows;
plotDataX_plusZero = cv::Mat::zeros(NumVecElements+1,1,CV_64F);
plotDataY_plusZero = cv::Mat::zeros(NumVecElements+1,1,CV_64F);
for(int i=0; i<NumVecElements; i++){
plotDataX_plusZero.at<double>(i,0) = plotDataX.at<double>(i,0);
plotDataY_plusZero.at<double>(i,0) = plotDataY.at<double>(i,0);
}
double MinX;
double MaxX;
double MinY;
double MaxY;
double MinX_plusZero;
double MaxX_plusZero;
double MinY_plusZero;
double MaxY_plusZero;
///Obtain the minimum and maximum values of Xdata
minMaxLoc(plotDataX,&MinX,&MaxX);
///Obtain the minimum and maximum values of Ydata
minMaxLoc(plotDataY,&MinY,&MaxY);
///Obtain the minimum and maximum values of Xdata plus zero
minMaxLoc(plotDataX_plusZero,&MinX_plusZero,&MaxX_plusZero);
///Obtain the minimum and maximum values of Ydata plus zero
minMaxLoc(plotDataY_plusZero,&MinY_plusZero,&MaxY_plusZero);
///setting the min and max values for each axis
plotMinX = MinX;
plotMaxX = MaxX;
plotMinY = MinY;
plotMaxY = MaxY;
plotMinX_plusZero = MinX_plusZero;
plotMaxX_plusZero = MaxX_plusZero;
plotMinY_plusZero = MinY_plusZero;
plotMaxY_plusZero = MaxY_plusZero;
///setting the default size of a plot figure
setPlotSize(600, 400);
///setting the default plot line size
setPlotLineWidth(1);
///setting default colors for the different elements of the plot
setPlotAxisColor(cv::Scalar(0, 0, 255));
setPlotGridColor(cv::Scalar(255, 255, 255));
setPlotBackgroundColor(cv::Scalar(0, 0, 0));
setPlotLineColor(cv::Scalar(0, 255, 255));
setPlotTextColor(cv::Scalar(255, 255, 255));
}
cv::Mat linearInterpolation(double Xa, double Xb, double Ya, double Yb, cv::Mat Xdata);
void drawAxis(int ImageXzero, int ImageYzero, double CurrentX, double CurrentY, cv::Scalar axisColor, cv::Scalar gridColor);
void drawValuesAsText(double Value, int Xloc, int Yloc, int XMargin, int YMargin);
void drawValuesAsText(const char * Text, double Value, int Xloc, int Yloc, int XMargin, int YMargin);
void drawLine(int Xstart, int Xend, int Ystart, int Yend, cv::Scalar lineColor);
};
}
#endif
#endif
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
//################################################################################
//
// Created by Nuno Moutinho
//
//################################################################################
#ifdef __OPENCV_BUILD
#error this is a compatibility header which should not be used inside the OpenCV library
#endif
#include "opencv2/plot.hpp"
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
//################################################################################
//
// Created by Nuno Moutinho
//
//################################################################################
#include "precomp.hpp"
using namespace cv;
using namespace std;
///render the plotResult to a Mat
void Plot::render(cv::Mat &_plotResult){
///create the plot result
plotResult = cv::Mat::zeros(plotSizeHeight, plotSizeWidth, CV_8UC3);
int NumVecElements = plotDataX.rows;
Mat InterpXdata = linearInterpolation(plotMinX, plotMaxX, 0, plotSizeWidth, plotDataX);
Mat InterpYdata = linearInterpolation(plotMinY, plotMaxY, 0, plotSizeHeight, plotDataY);
///Find the zeros in image coordinates
Mat InterpXdataFindZero = linearInterpolation(plotMinX_plusZero, plotMaxX_plusZero, 0, plotSizeWidth, plotDataX_plusZero);
Mat InterpYdataFindZero = linearInterpolation(plotMinY_plusZero, plotMaxY_plusZero, 0, plotSizeHeight, plotDataY_plusZero);
int ImageXzero = (int)InterpXdataFindZero.at<double>(NumVecElements,0);
int ImageYzero = (int)InterpYdataFindZero.at<double>(NumVecElements,0);
double CurrentX = plotDataX.at<double>(NumVecElements-1,0);
double CurrentY = plotDataY.at<double>(NumVecElements-1,0);
//Draw the plot by connecting lines between the points
cv::Point p1;
p1.x = (int)InterpXdata.at<double>(0,0);
p1.y = (int)InterpYdata.at<double>(0,0);
drawAxis(ImageXzero,ImageYzero, CurrentX, CurrentY, plotAxisColor, plotGridColor);
for (int r=1; r<InterpXdata.rows; r++){
cv::Point p2;
p2.x = (int)InterpXdata.at<double>(r,0);
p2.y = (int)InterpYdata.at<double>(r,0);
line(plotResult, p1, p2, plotLineColor, plotLineWidth, 8, 0);
p1 = p2;
}
_plotResult = plotResult.clone();
}
///show the plotResult from within the class
void Plot::show(const char * _plotName)
{
namedWindow(_plotName);
imshow(_plotName, plotResult);
waitKey(5);
}
///save the plotResult as a .png image
void Plot::save(const char * _plotFileName)
{
imwrite(_plotFileName, plotResult);
}
void Plot::drawAxis(int ImageXzero, int ImageYzero, double CurrentX, double CurrentY, Scalar axisColor, Scalar gridColor){
drawValuesAsText(0, ImageXzero, ImageYzero, 10, 20);
drawValuesAsText(0, ImageXzero, ImageYzero, -20, 20);
drawValuesAsText(0, ImageXzero, ImageYzero, 10, -10);
drawValuesAsText(0, ImageXzero, ImageYzero, -20, -10);
drawValuesAsText("X = %g",CurrentX, 0, 0, 40, 20);
drawValuesAsText("Y = %g",CurrentY, 0, 20, 40, 20);
//Horizontal X axis and equispaced horizontal lines
int LineSpace = 50;
int TraceSize = 5;
drawLine(0, plotSizeWidth, ImageYzero, ImageYzero, axisColor);
for(int i=-plotSizeHeight; i<plotSizeHeight; i=i+LineSpace){
if(i!=0){
int Trace=0;
while(Trace<plotSizeWidth){
drawLine(Trace, Trace+TraceSize, ImageYzero+i, ImageYzero+i, gridColor);
Trace = Trace+2*TraceSize;
}
}
}
//Vertical Y axis
drawLine(ImageXzero, ImageXzero, 0, plotSizeHeight, axisColor);
for(int i=-plotSizeWidth; i<plotSizeWidth; i=i+LineSpace){
if(i!=0){
int Trace=0;
while(Trace<plotSizeHeight){
drawLine(ImageXzero+i, ImageXzero+i, Trace, Trace+TraceSize, gridColor);
Trace = Trace+2*TraceSize;
}
}
}
}
Mat Plot::linearInterpolation(double Xa, double Xb, double Ya, double Yb, cv::Mat Xdata){
Mat Ydata = Xdata*0;
for (int i=0; i<Xdata.rows; i++){
double X = Xdata.at<double>(i,0);
Ydata.at<double>(i,0) = int(Ya + (Yb-Ya)*(X-Xa)/(Xb-Xa));
if(Ydata.at<double>(i,0)<0)
Ydata.at<double>(i,0)=0;
}
return Ydata;
}
void Plot::drawValuesAsText(double Value, int Xloc, int Yloc, int XMargin, int YMargin){
char AxisX_Min_Text[20];
double TextSize = 1;
sprintf(AxisX_Min_Text, "%g", Value);
cv::Point AxisX_Min_Loc;
AxisX_Min_Loc.x = Xloc+XMargin;
AxisX_Min_Loc.y = Yloc+YMargin;
putText(plotResult,AxisX_Min_Text, AxisX_Min_Loc, FONT_HERSHEY_COMPLEX_SMALL, TextSize, plotTextColor, 1, 8);
}
void Plot::drawValuesAsText(const char *Text, double Value, int Xloc, int Yloc, int XMargin, int YMargin){
char AxisX_Min_Text[20];
int TextSize = 1;
sprintf(AxisX_Min_Text, Text, Value);
cv::Point AxisX_Min_Loc;
AxisX_Min_Loc.x = Xloc+XMargin;
AxisX_Min_Loc.y = Yloc+YMargin;
putText(plotResult,AxisX_Min_Text, AxisX_Min_Loc, FONT_HERSHEY_COMPLEX_SMALL, TextSize, plotTextColor, 1, 8);
}
void Plot::drawLine(int Xstart, int Xend, int Ystart, int Yend, Scalar lineColor){
cv::Point Axis_start;
cv::Point Axis_end;
Axis_start.x = Xstart;
Axis_start.y = Ystart;
Axis_end.x = Xend;
Axis_end.y = Yend;
line(plotResult, Axis_start, Axis_end, lineColor, plotLineWidth, 8, 0);
}
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
//################################################################################
//
// Created by Nuno Moutinho
//
//################################################################################
#include "precomp.hpp"
/* End of file. */
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
//################################################################################
//
// Created by Nuno Moutinho
//
//################################################################################
#ifndef __OPENCV_PRECOMP_H__
#define __OPENCV_PRECOMP_H__
#include <opencv2/core.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <vector>
#include <iostream>
#include <stdio.h>
#include "opencv2/plot.hpp"
#include "opencv2/opencv_modules.hpp"
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment