Giter Club home page Giter Club logo

obsidian-gnuplot's Introduction

Obsidian GnuPlot Plugin

This is a very barebones plugin for drawing plots in obsidian simply by inserting code blocks like so:

```plot
plot sin(x)
```

When you switch to viewer mode, the plugin runs the gnuplot binary and displays the resulting plot as an image.

The text within the code block is executed as-is within gnuplot. The plugin first runs a predefined set of commands in order to make the resulting plot look better.

You can tweak with the initialization commands and change the path of the gnuplot binary in your settings.

The following is the init commands I use and an example plot generated with it:

set terminal svg enhanced background rgb 'white'

set xzeroaxis
set yzeroaxis
set zzeroaxis

set border 0
set xtics axis
set ytics axis

set xtics add ("" 0)
set ytics add ("" 0)

set tics scale 0.4

set style line 50 lt 1 lc rgb "white" lw 1
set key textcolor rgb "white"

set border ls 50
set xzeroaxis ls 50
set yzeroaxis ls 50

Inserting

```plot
plot sin(x) ls 1

into obsidian displays this image:

Plot generated

⚠️ Contributions

This is a very barebones plugin and all it essentially does is run a seperate gnuplot binary and insert its output to the preview screen. It works, but it can definitely use some work. I am VERY open to contributions/improvements on it so please feel free to send a pull request.

obsidian-gnuplot's People

Contributors

arg3t avatar leonardogeminiani avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.