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

error on drawing a horizontal line #1457

Closed
yordiak opened this issue Jun 16, 2020 · 2 comments
Closed

error on drawing a horizontal line #1457

yordiak opened this issue Jun 16, 2020 · 2 comments

Comments

@yordiak
Copy link

yordiak commented Jun 16, 2020

hello,

i am using Gadfly (v1.3) and julia (v1.4.2) on a wn10 64bit machine

the code

f(x)=x/(1-x)
plot(f,0,0.8, yintercept=1.5,  Geom.hline(style=:dot))

produces an error

Couldn't process recipe args: (typeof(f), Int64, Float64, Gadfly.Geom.HLineGeometry)

what am I missing?

@Mattriks
Copy link
Member

Mattriks commented Jun 16, 2020

Gadfly mainly expects vectors for aesthetics (unless your referring to a column in a Dataframe), even one-length vectors. This works for me:

using Gadfly
f(x)=x/(1-x)
p = plot(f,0,0.8, yintercept=[1.5],  Geom.hline(style=:dot))

Also see #1430 which lists the current syntaxes available for the color aesthetic.

@Mattriks
Copy link
Member

Closing this issue because it's been answered here and on stackoverflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants