Skip to content

Commit f83ba0a

Browse files
committed
fix: multiple functions, docs
1 parent 0f65ff8 commit f83ba0a

15 files changed

Lines changed: 32 additions & 4243 deletions

File tree

.github/labeler.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ automation:
1313

1414
invalid:
1515
- 'LICENSE'
16+
- 'versions.json'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ node_modules/
22
yarn-error.log
33
main.js
44
data.json
5+
package-lock.json

CONTRIBUTING.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Contributing
2+
3+
Contibutions are always welcome! We appreciate every help with this project, be it just submitting issues or feature requests, picking one up and working on it, making edits to the wiki or opening a pull request with a new feature or a bugfix, as it helps grow the project.
4+
5+
TL;DR:
6+
7+
- The `minAppVersion` should be kept up-to-date
8+
9+
## Rules
10+
11+
Because obsidian keeps an index of versions of the plugin and their respective minimum version requirements for obsidian itself, the `minAppVersion` field in `manifest.json` and the version of the dependency `obsidian` in `package.json` should be kept equal. The version should also reflect the lowest version of api under which the plugin will work. The dependency version in `package.json` is pinned to a single version.
12+
13+
Oh, and also: This project uses yarn, although it doesn't matter if you use another package manager so long as you don't commit the log and lock files to VCS. Just be sure to let us know of your choice of package manager if you encounter a problem.

README.md

Lines changed: 14 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -4,74 +4,35 @@ A plugin for displaying mathematical graphs in obsidian.md.
44

55
> *Remember to star this plugin on [Github](https://github.com/leonhma/obsidian-functionplot) if you like it.*
66
7-
## How to use
8-
9-
Since version `1.1.0` you can create plots via a handy GUI. Open the command palette and select `Obsidian Functionplot: Plot a function`. This opens a dialog where you can easily specify the options and functions to plot.
10-
11-
### Manual usage
12-
13-
1. Type:
14-
15-
~~~text
16-
```functionplot
17-
---
18-
title: Graph
19-
disableZoom: false
20-
bounds: [-10, 10, -10, 10]
21-
grid: true
22-
xLabel: x
23-
yLabel: y
24-
---
25-
26-
f(x) = x^2
27-
g(x) = 0.5*x^3+x^2-44
28-
```
29-
~~~
7+
*This file only contains basic instructions to get you to using this plugin quickly. If you want a more detailed documentation, take a look at the [wiki](https://github.com/leonhma/obsidian-functionplot/wiki).*
308

31-
*(The metadata header in this example contains all possible options, you don't usually have to specify all of them)*
32-
33-
2. This will create a coordinate system with bounds `-10 < x < 10, -10 < y < 10` and plot the functions f and g. If you havent disabled it, you can even drag and zoom the graph.
34-
35-
![Graph image](./images/graph-light.png#gh-light-mode-only)
36-
![Graph image](./images/graph-dark.png#gh-dark-mode-only)
37-
38-
## Options
39-
40-
This section describes all the header options in yaml format.
9+
## How to use
4110

42-
`title`: string, default: ""
43-
> The title of the graph.
11+
Since version `1.1.0` you can create plots via a handy GUI with live-preview functionality.
4412

45-
`disableZoom`: boolean, default: false
46-
> If true, the user can't zoom the graph.
13+
1. Open the command pallete and select `Obsidian Functionplot: Plot a Function`
4714

48-
`bounds`: array, default: [-10, 10, -10, 10]
49-
> The initial bounds of the graph. If disableZoom is true, this is permanent.
15+
2. Adjust the plot to your liking.
5016

51-
`grid`: boolean, default: true
52-
> If true, a grid is drawn.
17+
![Create plot modal](./images/create-modal/light.png#gh-light-mode-only)
18+
![Create plot modal](./images/create-modal//dark.png#gh-dark-mode-only)
5319

54-
`xLabel`: string, default: ""
55-
> The label of the x-axis.
20+
3. This will create a coordinate system with bounds `-10 < x < 10, -10 < y < 10` and plot the functions f and g. If you havent disabled it, you can even drag and zoom the graph.
5621

57-
`yLabel`: string, default: ""
58-
> The label of the y-axis.
22+
![Graph image](./images/plot/light.png#gh-light-mode-only)
23+
![Graph image](./images/plot/dark.png#gh-dark-mode-only)
5924

6025
## Questions
6126

6227
If you have any questions about the usage of the plugin, take a look at the [wiki](https://github.com/leonhma/obsidian-functionplot/wiki) or post a question in the [discussions](https://github.com/leonhma/obsidian-functionplot/discussions).
6328

6429
## Bugs and Errors
6530

66-
If you encounter any errors while using this plugin, please follow these steps:
31+
If you encounter any errors while using this plugin, please report them to us. To do so, click [this link](https://github.com/leonhma/obsidian-functionplot/issues/new?assignees=leonhma&labels=bug&template=BUG_REPORT.yml), fill out the form as best as you can and click `Submit new issue`. These issues are publically viewable, so please don't submit any personal information.
32+
33+
## Contributing
6734

68-
1. Make sure you have followed the syntax as described above.
69-
2. Ensure that you are using the latest version of this plugin. Do this by going to the "Community plugins" tab in the settings, and clicking "Check for updates".
70-
3. If the issue still persists, please report it on GitHub. (If you managed to solve this problem on your own, but think we should know about it, please file the fitting type of issue.)
71-
1. Go to the "Issues" tab of the repo.
72-
2. Search for your error. If you can find it, chime in to the converation and let us know that it happened to you too. It appears this is a known issue and it is currently being worked on.
73-
3. If you can't find it, open a new issue. Do this by clicking the "New issue" button in the top right. Select "Bug report".
74-
4. Fill out the issue with as much information as you can. Your issue will be resolved in the near future.
35+
Contributions are always welcome! Be it submitting issues, editing the wiki or creating a pull request, contributions by people like you help keep the project evolving. Please adhere to the [contributing guidelines](CONTRIBUTING.md).
7536

7637
## Attribution
7738

images/create-modal/dark.png

84.4 KB
Loading

images/create-modal/light.png

87.4 KB
Loading

images/graph-dark.png

-17.3 KB
Binary file not shown.

images/graph-light.png

-17.7 KB
Binary file not shown.

images/plot/dark.png

19.6 KB
Loading

images/plot/light.png

20 KB
Loading

0 commit comments

Comments
 (0)