-
Notifications
You must be signed in to change notification settings - Fork 13
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
No figure output #46
Comments
I think this is a downstream problem with the rgl package. Could you try plotting a simple example figure, e.g. (taken from here: library(rgl)
data(iris)
x <- sep.l <- iris$Sepal.Length
y <- pet.l <- iris$Petal.Length
z <- sep.w <- iris$Sepal.Width
rgl.open() # Open a new RGL device
rgl.points(x, y, z, color ="lightgray") # Scatter plot Does that give you a plot? Have you seen #45? It is just a wild guess, but maybe the solution given there (calling Apart from that, do you remember what you changed on your system before you lost the ability to plot images? Did you update MacOS, or something else? Which MacOS version and Xquartz version are you running? The last one I had access to (and could confirm that fsbrain works on it), was Big Sur. I remember that I had to update Xquartz at some time to keep rgl working under Big Sur. Also see #47 for some background. |
I can run the example code but indeed need to explicitly call the rglwidget to see any output. I'm running the latest mac OS (ventura) with the latest xquarx (and can run the display command fine too)... I'm creating a bunch of figures looping through various FreeSurfer output folder using this command:
where the Last time this worked was indeed on Big Sur, but first time the error message popped up I was on Montery (in fact I upgraded so I could also update xcode and xquartz in the hope that that would solve this... Sadly it hasn't |
I will ask around friends to see whether I can get someone with a Mac to install fsbrain and check this out, I guess. Trying to get this sorted out via some CI service running Mac OS instances does not sound like a good idea. |
Hi Richard (@rb643), I investigated this further and have 2 things:
Then press returns a couple of times to watch the demos. Do they show up?
|
Thanks Tim! The demo works fine (with the option enabled), but when printing to a file as in the code above I still get the same error:
|
I am the rgl maintainer. I can't run the code in the first comment; it dies here
before it ever gets to any rgl code. After applying some patches (PR coming as soon as the checks finish), I get displays during checking. I don't have any code that produces a display other than the checks, and they take forever to run, so I don't know if things worked before my patches. |
will give this a try once the patch is there, thanks for looking into it! The "subjects_dir" is the default subjects directory that comes with the FreeSurfer installation in my case I specificy that as a global outside this code |
If the demo runs for Richard, then this is indeed not an rgl problem. Thanks a lot for still looking into it, @dmurdoch. |
I don't know what FreeSurfer is, but perhaps it is interfering with rgl somehow. A very simple check would be to run |
This might be the crux then cause that is indeed what I get, though it seems to be related to the build I am using?
My xquartz is up to date so is there a way to (re-)build this with OpenGL support that I am missing? |
After reinstalling rgl from the repo, reinstalling quartz and updating pretty much all R possible dependencies I still have the same error and loading the rgl library still tells me the build doesn't support openGL, however when running the original code I now also get a number of additional warning so leaving those here in case they are relevant:
|
The deprecation warnings are coming from the devel version of rgl. You won't get those from the CRAN build, and it should also support OpenGL. If you really want to use the devel version, you need to have several development libraries available on your system. I get include files from these locations:
There are also these includes that are needed even without OpenGL, so I think you have them (or equivalents):
I forget now where I found the X11 and freetype2 includes. It's possibly via brew or by following the instructions here: https://github.com/R-macos/recipes. But I'd recommend using the CRAN build for now, or you're going to see a lot of deprecation warnings. |
That makes sense. With the Cran install I still get the warning that the build doesn't support OpenGL, am I missing anything to force that support? |
That's not good. I'm on an Intel Mac, and the CRAN build is fine. Presumably you're on an M1 or M2? Can you show me what rgl prints in a clean session when you just run |
I'm actually still on the intell (i9) mac, in a fresh Rstudio:
Running Mac Ventura 13.0.1. (and XQuartz 2.8.4). |
That's a somewhat old version of R, and a very new version of macOS. I would guess that Ventura has moved the locations of things, and CRAN is not updating old binaries. So I'd suggest updating to current R (4.2.2), and in the meantime I'll get in touch with CRAN to see if they have any other advice. Be aware that when you update R all existing packages will need to be reinstalled, so it might be time consuming. |
On it. And will keep you posted if that solves things. |
Seems that did indeed fix it. My apologies this seems to have been very much in the "have you tried turning it on and off again" class of problems. |
Staying up to date with R releases helps a lot. They only distribute binaries for 4.1.x and 4.2.x now, and will drop 4.1.x in a few months. So this update will make package installs a lot faster and easier for you. |
Great to hear that this could finally be solved. |
I appear to have lost the ability to plot image, when I run the tutorial code below it does not produce any image (either in the viewer window nor does it open a new window)... I've updated the installation, updated rgl, checked that my Quartz is up to date and nothing seems to make much difference... I'm running R version 4.0.3 on a Mac...
In addition, when I try and run
vis.export.from.coloredmeshes
with some of my own data I get the following error:I suspect these are somehow related problems, but no clue where to even start troubleshooting...
The text was updated successfully, but these errors were encountered: