how does one draw a horizontal line across a gosling.js plot
2
2
Entering edit mode
3.1 years ago
zhangz.cs ▴ 300

I want to use the rule mark to draw a horizontal line across the whole x-axis and at 2.5 in the y-axis. I don't know how I can do that.

gosling.js • 1.3k views
ADD COMMENT
1
Entering edit mode
3.0 years ago

Perhaps use the line mark with some placeholder data:

http://gosling-lang.org/docs/mark#line

To define a horizontal line, I presume that the data could something as simple as a JSON object that contains two points, one at each extremum of the x-axis (whatever that is for your dataset), with a signal or score value of 2.5:

http://gosling-lang.org/docs/data#json-no-higlass-server

The line mark would connect these two points, giving you a horizontal line.

ADD COMMENT
0
Entering edit mode
3.1 years ago
tothepoint ▴ 940

Details of your approach is missing. I assume, If you are working in R you can try this:

hline = 2.5, vline = 2.5

or the coordinates you are interested in.

ADD COMMENT
1
Entering edit mode

I don't think this is R, see https://gosling.js.org/

ADD REPLY

Login before adding your answer.

Traffic: 3093 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6