mirror of https://github.com/joplin/website.git
412 lines
12 KiB
HTML
412 lines
12 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<!-- Common page configuration that goes in the <head></head> tag -->
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,viewport-fit=cover"/>
|
|
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; img-src * data: ; style-src 'self' 'unsafe-inline' ; child-src 'none' ; connect-src 'self' raw.githubusercontent.com ;"/>
|
|
<link rel="icon" type="image/x-icon" href="/plugins/favicon.png" />
|
|
<link rel="stylesheet" href="/plugins/fontawesome-6.4.2/css/all.min.css" type="text/css"/>
|
|
|
|
<!-- Allow included JavaScipt files to determine the root directory of this site. -->
|
|
<script id="site-root" type="text/plain">/plugins</script>
|
|
|
|
<!-- Scripts used by all pages -->
|
|
<script src="/plugins/bundle-main.js"></script>
|
|
<script src="/plugins/bundle-components.js"></script>
|
|
<title>Joplin Plugins - Function Plot</title>
|
|
|
|
<meta property="og:title" content="Joplin Plugin: Function Plot"/>
|
|
<meta property="og:description" content="Joplin plugin based on Function Plot library to render function such as y = x * x"/>
|
|
<meta property="og:image" content=""/>
|
|
|
|
<script src="/plugins/bundle-pluginPage.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<nav class="navbar navbar-expand-lg bg-body-tertiary sticky-top">
|
|
<div class="container">
|
|
<a class="navbar-brand" href="https://joplinapp.org/">
|
|
<img src="/plugins/joplin-logo.png" alt="Home"/>
|
|
</a>
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
|
<ul class="navbar-nav ms-auto me-2 mb-2 mb-lg-0">
|
|
<li class="nav-item">
|
|
<a class="nav-link active" aria-current="page" href="/plugins">Plugins</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="https://joplinapp.org/news/">News</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="https://joplinapp.org/help/">Help</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="https://discourse.joplinapp.org/">Forum</a>
|
|
</li>
|
|
</ul>
|
|
<div class="search-field col-12 col-lg-3 mb-3 mb-lg-0 me-lg-3">
|
|
<i class="fa-solid fa-magnifying-glass search-icon" alt=""></i>
|
|
<input
|
|
type="search"
|
|
class="form-control search-input"
|
|
placeholder="Search..."
|
|
id="search-input"/>
|
|
<div class="search-results" id="search-results-container" aria-live="polite"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<main class="plugin-details">
|
|
<nav aria-label="breadcrumb" class="container breadcrumb-container">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item">
|
|
<a href="/plugins"><i class="fas fa-home"></i> Home</a>
|
|
</li>
|
|
<li class="breadcrumb-item"><a id="current-category-nav-link" href="/plugins/">All</a></li>
|
|
<li class="breadcrumb-item active" aria-current="page">Function Plot</li>
|
|
</ol>
|
|
</nav>
|
|
<div class="plugin-overview">
|
|
<div class="spacer">
|
|
</div>
|
|
<div class="plugin-page-header">
|
|
<div class="title plugin-page-title">
|
|
<img
|
|
class="icon plugin-icon -missing"
|
|
src=""
|
|
alt="Plugin icon"
|
|
/>
|
|
<div>
|
|
<h1 class="card-title">Function Plot</h1>
|
|
<div class="card-title pb-2">
|
|
by
|
|
<a
|
|
href="./?search=author%3D%22Hieu-Thi Luong%22%20max-results%3D20"
|
|
style="display: inline;"
|
|
>
|
|
Hieu-Thi Luong
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="categories">
|
|
<a class="plugin-category me-2 badge" href="/plugins/#tab-productivity">
|
|
<i class="fas fa-tag"></i> productivity
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="download-link-container">
|
|
<a
|
|
href="/plugins/downloadPlugin.html?plugin=com.hieuthi.joplin.function-plot"
|
|
class="btn btn-primary process--append-parent-tab-to-href"
|
|
>
|
|
Install Plugin
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="plugin-content">
|
|
<div class="secondary-section">
|
|
<div class="content" id="screenshots-container">
|
|
<div id="raw-screenshots">
|
|
</div>
|
|
|
|
<!-- See https://getbootstrap.com/docs/5.3/components/carousel/ -->
|
|
<div id="screenshots-carousel" class="carousel slide">
|
|
<button
|
|
class="carousel-control-prev"
|
|
type="button"
|
|
data-bs-target="#screenshots-carousel"
|
|
data-bs-slide="prev"
|
|
>
|
|
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
|
<span class="visually-hidden">Previous</span>
|
|
</button>
|
|
<button
|
|
class="carousel-control-next"
|
|
type="button"
|
|
data-bs-target="#screenshots-carousel"
|
|
data-bs-slide="next"
|
|
>
|
|
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
|
<span class="visually-hidden">Next</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="container section">
|
|
<h3>Description</h3>
|
|
<p class="card-text pb-4">Joplin plugin based on Function Plot library to render function such as y = x * x</p>
|
|
</div>
|
|
<div class="container section">
|
|
<h3>Additional Information</h3>
|
|
<table class="additional-information-table">
|
|
<tbody>
|
|
<tr>
|
|
<th>Links:</th>
|
|
<td>
|
|
<ul class="list-group list-group-flush text-break">
|
|
<li><a href=https://github.com/hieuthi/joplin-plugin-function-plot style="display: block;"><i class="fa-solid fa-link"></i> Repository</a></li>
|
|
<li><a href=https://github.com/hieuthi/joplin-plugin-function-plot style="display: block;"><i class="fa-solid fa-link"></i> Homepage</a></li>
|
|
<li>
|
|
<a
|
|
id="view-plugin-source-link"
|
|
href="/plugins/view-source.html?plugin=com.hieuthi.joplin.function-plot"
|
|
class="process--append-parent-tab-to-href"
|
|
>
|
|
<i class="fa-solid fa-code"></i> View source
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Maintainers:</th>
|
|
<td>
|
|
<a href="./?search=maintainer%3D%22hieuthi%22%20max-results%3D20" class="maintainer-link">
|
|
hieuthi
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
<tr><th>Version:</th><td>1.0.0</td></tr>
|
|
<tr><th>Minimum app version:</th><td>2.7</td></tr>
|
|
<tr><th>Downloads: This version:</th><td>1061</td></tr>
|
|
<tr><th>Last updated:</th><td class="process--format-as-local-time">2022-10-20T09:05:57Z</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="container section" id="readme" data--is-rendered-markdown>
|
|
|
|
<h1>Function Plot</h1>
|
|
<p>This plugin render a fenced JSON options into a function plot. It is essentially a Joplin wrapper of the function-plot library of Mauricio Poppe, which does most of the heavy lifting.</p>
|
|
<p><img src="https://raw.githubusercontent.com/hieuthi/joplin-plugin-function-plot/main/docs/function-plot-v1.0.0-screenshot.png" alt="screenshot" /></p>
|
|
<h2>Usage</h2>
|
|
<p>Some simple examples can be found in the example below. For advanced usage please check the document of <a href="https://mauriciopoppe.github.io/function-plot/">function-plot</a>. Note that some features of the library are not supported by the plugin such as linked graphs, tip function, etc. Basically anything that outside the JSON options are not supported.</p>
|
|
<p>One important warning is that you need to write the options in JSON format while examples in <a href="https://mauriciopoppe.github.io/function-plot/">function-plot</a> is actually javascript objects. Meaning that you need to double-quote all keys, do not use single quote, and do not leave ending comma.</p>
|
|
<pre class="hljs"><code><span class="hljs-section"># 📈 Function Plot</span>
|
|
|
|
<span class="hljs-section">## Plotting a curve</span>
|
|
|
|
<span class="hljs-bullet">-</span> $y=x^2$
|
|
|
|
<span class="hljs-code">```function-plot
|
|
{
|
|
"width" : 400,
|
|
"height": 250,
|
|
"target": "#quadratic",
|
|
"data": [{
|
|
"fn": "x^2"
|
|
}]
|
|
}
|
|
```</span>
|
|
|
|
|
|
|
|
<span class="hljs-bullet">-</span> Advanced
|
|
<span class="hljs-code">```function-plot
|
|
{
|
|
"width" : 400,
|
|
"height": 250,
|
|
"target": "#quadratic",
|
|
"data": [{
|
|
"fn": "x^2"
|
|
}],
|
|
"title": "Function y = x * x",
|
|
"xAxis": {
|
|
"label": "x - axis",
|
|
"domain": [-6,6]
|
|
},
|
|
"yAxis": {
|
|
"label": "y - axis"
|
|
},
|
|
"disableZoom": true,
|
|
"grid": true
|
|
}
|
|
```</span>
|
|
|
|
|
|
<span class="hljs-section">## Derivative</span>
|
|
<span class="hljs-code">```function-plot
|
|
{
|
|
"width" : 400,
|
|
"height": 250,
|
|
"target": "#derivative",
|
|
"data": [{
|
|
"fn": "x^2",
|
|
"derivative": {
|
|
"fn": "2 * x",
|
|
"x0": 2,
|
|
"updateOnMouseMove": true
|
|
}
|
|
}]
|
|
}
|
|
```</span>
|
|
|
|
<span class="hljs-section">## Range and closed path</span>
|
|
<span class="hljs-bullet">-</span> $sin(x) +3$
|
|
<span class="hljs-code">```function-plot
|
|
{
|
|
"width" : 400,
|
|
"height": 250,
|
|
"target": "#closed",
|
|
"xAxis": {"domain": [-2, 12]},
|
|
"data": [{
|
|
"fn": "3 + sin(x)",
|
|
"range": [2, 8],
|
|
"closed": true
|
|
}]
|
|
}
|
|
```</span>
|
|
|
|
<span class="hljs-section">## Multiple graphs</span>
|
|
<span class="hljs-code">```function-plot
|
|
{
|
|
"width" : 400,
|
|
"height": 250,
|
|
"target": "#multiple",
|
|
"data": [
|
|
{ "fn": "x", "color": "pink" },
|
|
{ "fn": "-x" },
|
|
{ "fn": "x * x" },
|
|
{ "fn": "x * x * x" },
|
|
{ "fn": "x * x * x * x" }
|
|
]
|
|
}
|
|
```</span>
|
|
|
|
|
|
<span class="hljs-section">## Parametric Function</span>
|
|
<span class="hljs-code">```function-plot
|
|
{
|
|
"width" : 400,
|
|
"height": 250,
|
|
"target": "#parametric-circle",
|
|
"yAxis": {"domain": [-1.897959183, 1.897959183]},
|
|
"xAxis": {"domain": [-3, 3]},
|
|
"data": [{
|
|
"x": "cos(t)",
|
|
"y": "sin(t)",
|
|
"fnType": "parametric",
|
|
"graphType": "polyline"
|
|
}]
|
|
}
|
|
|
|
```</span>
|
|
|
|
<span class="hljs-section">## Constants</span>
|
|
<span class="hljs-bullet">-</span> $\pi$
|
|
<span class="hljs-code">```function-plot
|
|
{
|
|
"width" : 400,
|
|
"height": 250,
|
|
"target": "#pi-constant",
|
|
"data": [
|
|
{"fn": "sin(x)"},
|
|
{"fn": "sin(x+PI/4)"},
|
|
{"fn": "sin(x+PI/2)"}]
|
|
}
|
|
```</span>
|
|
|
|
<span class="hljs-bullet">-</span> $e$
|
|
|
|
<span class="hljs-code">```function-plot
|
|
{
|
|
"width" : 400,
|
|
"height": 250,
|
|
"target": "#euler-constant",
|
|
"data": [
|
|
{"fn": "E^x", "graphType":"polyline"}
|
|
]
|
|
|
|
}
|
|
```</span>
|
|
</code></pre>
|
|
<h2>Acknowledgement</h2>
|
|
<ul>
|
|
<li>This plugin is not possible without the <a href="https://github.com/mauriciopoppe/function-plot">function-plot</a> library of Mauricio Poppe</li>
|
|
</ul>
|
|
<h2>License</h2>
|
|
<p><a href="https://raw.githubusercontent.com/hieuthi/joplin-plugin-function-plot/main/LICENSE">MIT</a></p>
|
|
|
|
</div>
|
|
</div>
|
|
</main>
|
|
|
|
<footer class="page-footer">
|
|
<div class="plugin-documentation-section">
|
|
<div class="heading">
|
|
Would you like to submit or develop a plugin? Consult our documentation:
|
|
</div>
|
|
<a class="btn btn-outline-primary" href="https://joplinapp.org/help/api/get_started/plugins">
|
|
See documentation
|
|
</a>
|
|
</div>
|
|
|
|
<div class="links legal-and-about-links">
|
|
<div class="copyright">© Joplin 2023 - 2024</div>
|
|
<a class="link terms-and-conditions" href="/plugins/terms-and-conditions.html">Terms and conditions</a>
|
|
<a class="link privacy" href="/plugins/privacy-policy.html">Privacy policy</a>
|
|
</div>
|
|
|
|
|
|
<div class="site-links">
|
|
<a
|
|
class="a-github"
|
|
href="https://github.com/joplin/website-plugin-discovery"
|
|
aria-label="GitHub"
|
|
title="GitHub"
|
|
>
|
|
<i class="fab fa-github"></i>
|
|
</a>
|
|
<a
|
|
class="a-discord"
|
|
href="https://discord.com/invite/VSj7AFHvpq"
|
|
aria-label="Discord"
|
|
title="Discord"
|
|
>
|
|
<i class="fab fa-discord"></i>
|
|
</a>
|
|
<a
|
|
class="a-linkedin"
|
|
href="https://www.linkedin.com/company/joplin"
|
|
aria-label="LinkedIn"
|
|
title="LinkedIn"
|
|
>
|
|
<i class="fab fa-linkedin"></i>
|
|
</a>
|
|
<a
|
|
class="a-twitter"
|
|
href="https://twitter.com/joplinapp"
|
|
aria-label="Twitter"
|
|
title="Twitter"
|
|
>
|
|
<i class="fab fa-twitter"></i>
|
|
</a>
|
|
<a
|
|
class="a-mastodon"
|
|
href="https://mastodon.social/@joplinapp"
|
|
aria-label="Mastodon"
|
|
title="Mastodon"
|
|
>
|
|
<i class="fab fa-mastodon"></i>
|
|
</a>
|
|
<a
|
|
class="a-patreon"
|
|
href="https://www.patreon.com/joplin"
|
|
aria-label="Patreon"
|
|
title="Patreon"
|
|
>
|
|
<i class="fab fa-patreon"></i>
|
|
</a>
|
|
</div>
|
|
</footer>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|