# Plotting scientific graphs with Juce

**URL:** <https://forum.juce.com/t/plotting-scientific-graphs-with-juce/54780>\
**Category:** Audio Plugins\
**Created:** [January 30, 2023, 8:30am UTC](https://forum.juce.com/t/plotting-scientific-graphs-with-juce/54780 "2023-01-30T08:30:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidwallis](https://avatars.discourse-cdn.com/v4/letter/d/87869e/32.png) [@davidwallis](https://forum.juce.com/u/davidwallis)\
**Post date:** [January 30, 2023, 8:30am UTC](https://forum.juce.com/t/plotting-scientific-graphs-with-juce/54780/1 "2023-01-30T08:30:10Z")

</div>

Hi all,

Is it possible to produce scientific plots with Juce? I would like to produce scatter plots with multiple timeseries, error bars and labeled axes. My use case is to load some audio data into Audacity, do some processing, and produce some scientific output in the form of scientific plots. My plugin would have some parameter inputs / controls, and a plot canvas.

What’s the best way of tackling this?  
I’m a complete beginner at audio plugins, but I have a strong background in scientific data analysis and can write C++ code.

Thanks,  
David

---

<div class="post-metadata">

**Author:** ![PluginPenguin](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/pluginpenguin/32/10203_2.png) [@PluginPenguin](https://forum.juce.com/u/PluginPenguin)\
**Post date:** [January 30, 2023, 9:20am UTC](https://forum.juce.com/t/plotting-scientific-graphs-with-juce/54780/2 "2023-01-30T09:20:24Z")

</div>

Do you want the plugin to display this plot in its user interface or do you want to export these plots e.g. to a PDF? In the second case, you might want to have a look at [sciplot](https://sciplot.github.io) which is a convenient C++ interface wrapper for gnuplot. We use it to automatically generate PDF plots for test failures in our DSP unit tests. It is however not really suited to display those plots in the plugin Editor.

---

<div class="post-metadata">

**Author:** ![davidwallis](https://avatars.discourse-cdn.com/v4/letter/d/87869e/32.png) [@davidwallis](https://forum.juce.com/u/davidwallis)\
**Post date:** [January 30, 2023, 9:37am UTC](https://forum.juce.com/t/plotting-scientific-graphs-with-juce/54780/3 "2023-01-30T09:37:51Z")

</div>

Yes, the plan is to have the plots shown in the UI. I would also like to export to pdf, but the main aim is to have the UI show the plots. Real-time performance isn’t an issue, so I don’t need it to be super speedy. The user will select some audio, run the plugin and get the plots from the signal analysis. The plugin will have controls and inputs that feed parameters to the algorithm. The user will be able to change the processing parameters and either the plots update automatically or you press an ‘update’ button and the graphs are redrawn.

I should add, it’s not a music plugin. It’s a scientific application. Essentially a mini data analysis tool that pops up from audacity.

---

<div class="post-metadata">

**Author:** ![aamf](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/aamf/32/19941_2.png) [@aamf](https://forum.juce.com/u/aamf)\
**Post date:** [January 30, 2023, 9:47am UTC](https://forum.juce.com/t/plotting-scientific-graphs-with-juce/54780/4 "2023-01-30T09:47:31Z")

</div>

> **[GitHub - franshej/CustomMatPlot: Plot library for the JUCE Framework](https://github.com/franshej/CustomMatPlot)**
>
> Plot library for the JUCE Framework. Contribute to franshej/CustomMatPlot development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![davidwallis](https://avatars.discourse-cdn.com/v4/letter/d/87869e/32.png) [@davidwallis](https://forum.juce.com/u/davidwallis)\
**Post date:** [January 30, 2023, 9:53am UTC](https://forum.juce.com/t/plotting-scientific-graphs-with-juce/54780/5 "2023-01-30T09:53:51Z")

</div>

I think this is exactly what I’m looking for.  
Thanks for the suggestion.  
David
