Coder Social home page Coder Social logo

marcosnicolau / obsidian-mathematica-plot Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 0.0 74.1 MB

Insert functions on Obsidian using Wolfram Mathematica!

License: MIT License

JavaScript 4.15% CSS 2.20% TypeScript 93.65%
obsidian obsidian-plugin wolfram-mathematica math

obsidian-mathematica-plot's Introduction

Obsidian Mathematica Plot

Obsidian Mathematica Plot is a plugin that allows you to plot mathematical graphs using Wolfram Mathematica.

Features

  • Plot graphs using Wolfram mathematica code
  • Plot 2D graphs
  • Plot 3D graphs
  • Preview graphs while editing
  • Edit already created graphs
  • Create image file and wikilink (currently working on)
  • Ability to plot several graphs in a row

How to use

To use this plugin, you must have installed wolframscript. You can do it here.

Enter the command Plot Graph on the command palette to plot a graph. Then complete the fields, which accept Wolfram Mathematica code. I suggest checking their docs here.

plot_1_edit.mp4
plot_2_edit.mp4

How to install

This is an Obsidian plugin like any other, and must be cloned or unzipped into your vault's .obsidian/plugins/ directory, then enabled in the Obsidian configuration. It's not registered as a standard community plugin for downloading or updating within Obsidian. Though it is in the revision process.

  1. Clone the project in .obsidian/plugins/
  2. Run npm run build
  3. Enable the plugin in the Obsidian configuration

Contributing

Contributions are encouraged, I will review any incoming pr. Also, it would be really helpful if you could create an issue whenever you encounter a bug or something that does not work as expected, thank you!!

obsidian-mathematica-plot's People

Contributors

marcosnicolau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

obsidian-mathematica-plot's Issues

Command not found in Flatpak

If Obsidian is installed via flatpak, it won't load the PATH variable, so the command won't be found.

The current solution now is to install the .deb version.

wolframscript: command not found

My local wolframscript is not found, however works in the terminal.

The installation went without a problem, but plots produce this type of error:

Error: Command failed: wolframscript --code "ExportString[Rasterize[Show[Plot[x,{x,0,10}],Axes->True,AxesLabel->{x,y},Frame->False,Boxed->True],ImageSize->{250,Automatic},Background->None,AspectRatio->Automatic], {\"Base64\", \"PNG\"}]" /bin/sh: line 1: wolframscript: command not found

which wolframscript returns /usr/bin/wolframscript. However, entering this path in the settings also does not work:

Error: Command failed: "/usr/bin/wolframscript" --code "ExportString[Rasterize[Show[Plot[x,{x,0,10}],Axes->True,AxesLabel->{x,y},Frame->False,Boxed->True],ImageSize->{250,Automatic},Background->None,AspectRatio->Automatic], {\"Base64\", \"PNG\"}]" /bin/sh: line 1: /usr/bin/wolframscript: No such file or directory

OS: Linux Mint 21.2
Obsidian: v1.5.8

Other things i tested:

  • executing the command in terminal -> runs without issue
  • tested installation via community plugin browser and via clone from git

I tried to have a look at it myself but i have no experience with javascript and did not get very far :)

Plot range not automatically adjusting based on plots domains

When drawing functions with different domains, the plot does not automatically adjust its view to contain them.

The current workaround until the fix is to add: others: PlotRange -> Automatic under the general directive in the generated yml (can't add this from the command modal).

The yml should look like:

raster:
general:
    ...
    others: PlotRange -> Automatic
graphs:

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.