Nigecat / obsidian-desmos

Embed graphs directly into your obsidian notes
GNU General Public License v3.0
125 stars 7 forks source link

A question about drawing a line between points #58

Closed omergunr100 closed 2 years ago

omergunr100 commented 2 years ago

First of all I just wanted to say that your plugin is absolutely awesome!

It's a minor thing, but I wanted to know if there's a way to draw a line between 2 point, like this: image

Thanks again for putting in the effort to create this amazing plugin :)

Nigecat commented 2 years ago

There's currently no way to directly draw a line between two points, however you can emulate it by drawing the two points then separately adding a line with a domain restriction, for example:

```desmos-graph
left=-1; right=2;
bottom=-1; top=2;
defaultColor=red;
---
(0,0)|label:(0,0)
(1,1)|label:(1,1)
y=x|0<=x<=1

Would result in:
![image](https://user-images.githubusercontent.com/48661288/166125427-24f3f16f-01b7-485e-ad83-9000adf95362.png)
omergunr100 commented 2 years ago

Ok, thank you :)