Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vsl.plot annotations show a downward-sloping arrow #174

Open
holder66 opened this issue Oct 17, 2023 · 0 comments
Open

vsl.plot annotations show a downward-sloping arrow #174

holder66 opened this issue Oct 17, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@holder66
Copy link

Describe the bug

newplot-3

Expected Behavior

No arrow!

Current Behavior

No errors. Interestingly, the annotation position when running the code is different from its position in the generated png file.
screen shot of annotated plot.pdf

Reproduction Steps

module main

import vsl.plot
import vsl.util

fn main() {
	y := [
		0.0,
		1,
		3,
		1,
		0,
		-1,
		-3,
		-1,
		0,
		1,
		3,
		1,
		0,
	]
	x := util.arange(y.len).map(f64(it))
	mut plt := plot.Plot.new()
	plt.scatter(
		x: x
		y: y
		mode: 'lines+markers'
		marker: plot.Marker{
			size: []f64{len: x.len, init: 10.0}
			color: []string{len: x.len, init: '#FF0000'}
		}
		line: plot.Line{
			color: '#FF0000'
		}
	)
	annotation1 := plot.Annotation{
		text: 'test annotation'
	}
	plt.layout(
		title: 'Scatter plot example'
		annotations: [annotation1]
	)
	plt.show()!
}

Possible Solution

No response

Additional Information/Context

No response

V version

see below

Version used

vsl as of 2023-10-17 13h47 EST

Environment details (OS name and version, etc.)

V full version: V 0.4.2 4bc9a8f.dc6e317
OS: macos, macOS, 14.0, 23A344
Processor: 16 cpus, 64bit, little endian, Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz

getwd: /Users/henryolders
vexe: /Users/henryolders/v/v
vexe mtime: 2023-10-17 17:36:44

vroot: OK, value: /Users/henryolders/v
VMODULES: OK, value: /Users/henryolders/.vmodules
VTMP: OK, value: /tmp/v_507

env VFLAGS: "-use-os-system-to-run"

Git version: git version 2.41.0
Git vroot status: weekly.2023.33-368-gdc6e3178-dirty
.git/config present: true

CC version: Apple clang version 15.0.0 (clang-1500.0.40.1)
thirdparty/tcc status: thirdparty-macos-amd64 46662e20

@holder66 holder66 added the bug Something isn't working label Oct 17, 2023
@ulises-jeremias ulises-jeremias self-assigned this Oct 17, 2023
@ulises-jeremias ulises-jeremias linked a pull request Oct 21, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants