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

Text alignment is slightly off #45

Closed
hadley opened this issue Nov 12, 2015 · 10 comments
Closed

Text alignment is slightly off #45

hadley opened this issue Nov 12, 2015 · 10 comments

Comments

@hadley
Copy link
Member

hadley commented Nov 12, 2015

plot.new()
text(0.5, 0.5, label = "o", cex = 20)
points(0.5, 0.5, cex = 20, col = "red")

htmlSVG({
  plot.new()
  text(0.5, 0.5, label = "o", cex = 20)
  points(0.555, 0.57, cex = 20, col = "red")
})
@dmenne
Copy link

dmenne commented Dec 11, 2015

This is probably the same as above, size is also off. Sorry that the example uses an a bit exotic package, I just tried to reproduce an old report with svglite.

library(svglite)
library(qgraph)

data(iris)
mat = cor(iris[,-5])
qgraph(mat)

svg()
qgraph(mat)
dev.off()

svglite()
qgraph(mat)
dev.off()

@hadley
Copy link
Member Author

hadley commented Feb 7, 2016

Fixed now. It was the same issue as #48

@hadley hadley closed this as completed Feb 7, 2016
hadley added a commit that referenced this issue Feb 8, 2016
@dmenne
Copy link

dmenne commented Feb 8, 2016

Installed with devtools, gives

error on line 16 at column 2: StartTag: invalid element name

in svg file viewed with Chrome (svg plot default is ok).

@hadley
Copy link
Member Author

hadley commented Feb 8, 2016

It works fine for me. Could you please include the contents of line 16?

@hadley
Copy link
Member Author

hadley commented Feb 8, 2016

@dmenne should be fixed now - realised I introduced a windows only bug

@dmenne
Copy link

dmenne commented Feb 8, 2016

Downloaded current github, but still there? Not yet pushed?
Rplots.zip

@hadley
Copy link
Member Author

hadley commented Feb 8, 2016

I just tested it in my windows vm and it looked ok. Did you restart R before re-installing?

@timelyportfolio
Copy link
Contributor

Just tested on my Windows 7 machine also, and the code works fine. @hadley, would this in any way require the newest devtools or Rcpp also?

image

@hadley
Copy link
Member Author

hadley commented Feb 8, 2016

No, it's probably just things I've fixed. (BTW can you please not include session info unless I request it - it's not usually useful)

@dmenne
Copy link

dmenne commented Feb 9, 2016

Works. Thanks.

About session info: I have been scolded by King Brian too often so it became a habit especially when drivers are involved.

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

3 participants