quartz device behaving strangely after mac update - R mac - r

I recently got a new macbook pro (2020 13-inch, running Big Sur v 11.1) and am using Rstudio (V 1.3.1093 with R version 4.0.3).
On my old computer, I often used the quartz() function to view my plots in the external graphics viewer. On my old mac, this would allow me to dynamically resize, keep fonts consistent, save directly from the resized version, etc. Now, on my new computer, it is behaving... strangely.
For example, when I run quartz() and a window opens, then I run a ggplot, the quartz window remains completely blank until I resize it just a tiny bit, then my plot appears. Even after the plot appears, sometimes the corners are cut off until I resize again, which then (I guess) refreshes the plot so it properly fills the space. The behavior with ggsave seems off, too, like the plots aren't saving exactly how they are appearing, which is the whole point of using the device.
Is anyone else having similar problems? I don't understand in great detail how graphics devices work, so I know this post is maybe not incredibly informative.
Thanks.

Related

Issue with Rstudio version (Version 1.3.1073) "Giant goldenrod" when moving R studio window to new monitor doesn't display correctly

This is a basic question that I hope has a simple solution. When I move my Rstudio window to an external monitor display - it no longer rescales properly and instead is rendered completely useless - showing me only the lower portion of the window (see screenshot) and doesn't allow me to resize the window or adjust it in anyway to access the taskbar along the top. Has anyone else experienced this or have options for how this could be fixed?
I frequently need to shift my Rstudio window to different monitors, and I was doing this with no issue prior to installing the latest Rstudio version - so I am wondering if there must just be some setting that got reset when I updated the software, but I can't seem to figure it out. I have tried fixing scaling options in Windows by using the properties options on the Rstudio icon on my desktop - and then clicking on compatibility and High DPI settings, but messing around with that so far hasn't seemed to work. However I haven't tried all possible combinations as i thought I would check here first to see if someone could fast track this process for me. As you can see in the image - this display is impossible to work with. When I move it back - it works as it should. I am using Windows 10, and I update my software regularly. TY!
Update
Ok, I was able to reproduce on a Lenovo with an external Dell monitor and address the problem by applying a fix proposed in another Stack Overflow thread. See below:
Research:
https://support.microsoft.com/en-us/topic/windows-scaling-issues-for-high-dpi-devices-508483cd-7c59-0d08-12b0-960b99aa347d
Resolution:
There is a solution, it comes from the option "Compatibility" of the execute file.
Close all current RStudio windows.
Right-click on the shortcut of RStudio (or the original .exe file) and choose Properties
In the RStudio Properties pop-up windows, choose the tab Compatibility
Select High DPI settings
Tick on option Override hide DPI scaling... and then choose System from the drop-down list.
Apply > OK.
(Re)open Rstudio to see the change
On my test system, this addressed the problem observed where the menu text became super large.
Stackoverflow original reference:
RStudio HiDPI support
This appears to be an issue with the version of QT used by RStudio. RStudio is built on top of the QT engine.
QT tracking Issue:
https://bugreports.qt.io/browse/QTBUG-48242
the issue is marked as fixed in QT version 5.9.0 and above.
Recommendation:
Download RStudio preview and try that:
https://www.rstudio.com/products/rstudio/download/preview/
Why? The preview version of RStudio appears to use QtWebEngine/5.12.8, which implies the issue is addressed. If that does not resolve the issue you could file a bug with RStudio, or install and recompile RStudio from the source with an updated version of QT. You can check your QT version via the help, about box.
Hoping the above points you in the right direction. Stays safe and well.

Scroll bar on Mac RStudio blocks view of code

My scroll bar in RStudio keeps blocking the view of my code in RStudio, even as I try changing settings for Scroll Bar Behaviour in Mac System Preferences. It doesn't move or disappear, but stay put, overlapping and in front of my code. See picture below for example.
Solutions in other threads point to changing the setting for the Scroll Bar Behaviour to Automatic. However, since that hasn't solved it, for me at least, I wanted to ask you for advice on how to fix this.
I'm running macOS Mojave, version 10.14.6, on a Macbook, having just updated RStudio.
Based on some GitHub chatter here, sounds like this is bug between macOS Mojave, RStudio and some software underpinnings to RStudio called Qt. I hope RStudio will release a fix for this, but in the meantime a temporary fix can be achieved by
System Preferences >> General >> Show scroll bars: When scrolling

Very slow View and column name lagged behind after new update 1.1.453

I updated my Rstudio to Version 1.1.453. After I updated it, "View" became so slow and column names are always way lag behind side scrolling. Vertical scrolling takes some seconds to show which way slower than the previous version. note that my table is 10000*40.
The problem is even worse in Modern Theme and Sky Theme (Classic Theme works better).
It used to work faster in the old version.
(I am using mac os 10.13.5).
Is there any way that I can fix this issue?

Prevent R's newly opened devices to get the focus

When I open a plot from the R console:
I am happy that the device opens on top of the screen so I can see it
I am unhappy that the device gets the focus because I can't type any additional commands then before I navigate back to the console.
How do I get only the first of these two behaviours?
Is there a way to open a new R device on top of the screen without loosing the console focus?
[Update]: According to Carl's comment, calling windows(4.5,4.5,restoreConsole=T) before plot does the trick. But this seems to be just a temporary fix for Windows. Any more generic solution? Or X11, Wayland equivalents?
Found this solution here.
bringToTop(-1)

Change browser to display retina or webkit-min-device-pixel-ratio: 2 [duplicate]

How can you simulate a retina display (HiDPI mode) in Mac OS X 10.8 Mountain Lion on a non-retina display?
Search for, download, and install Apple's free Additional Tools for Xcode 8 (for previous Xcode releases search for Graphics Tools for Xcode according to your version).
Note: free Apple Developer account required.
Launch Quartz Debug application.
Go to menu: Window ---> UI Resolution.
Check Enable HiDPI display modes.
Quit Quartz Debug.
Open System Preferences.
Select Displays icon.
If using multiple display, select the configuration window on the display you wish to simulate HiDPI mode on.
Under Resolution:, select Scaled radio button.
Find a desired resolution postfixed with (HiDPI) and select it.
Your display is now running in HiDPI mode, simulating a retina display.
Source: High Resolution Guidelines for OS X
I found the following instructions. It seems to work, and it is much easier than the Quartz Debug approach.
"Enable HiDPI mode in Mountain Lion w/o Quartz Debug"
https://gist.github.com/3191869
In brief, run the following commands, log out, log on, and the HiDPI resolutions are available in the display preferences:
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool YES
sudo defaults delete /Library/Preferences/com.apple.windowserver DisplayResolutionDisabled
(In my case the first command was enough; the second command just prints an error message.)
Edit: (5/31/2016)
For users trying to do this on El Capitan, please read the FAQ on SwitchRes's website. Also, if something's still not working after you did all the steps in the FAQ, consider uninstalling and reinstalling SwitchResX. That solved the issue I was having on one of my laptops.
Original:
After reading through several forums, websites, blogs.
I am here to present a solution for users with 15" MacBook Pro with Retina display connected to a Thunderbolt Display.
First of all,
Terminal command of modifying plist
Quartz Debug
Holding option and select "Scaled" in System Preferences
ResolutionTab (Mac App Store)
These methods DO NOT work for MBPr with Thunderbolt Display, for whatever reasons.
You will not see the HiDPI options to be selected.
The only tool I found that actually gives us the options is SwitchResX.
However another problem exists here.
Most users with this setup, I believe, are trying to use 1280x720 HiDPI because it's half the native resolution of the TBD.
According SwitchResX's FAQ, in some cases it is not possible to set to this resolution because of a bug within OS X itself.
Here's a screenshot for your reference:
After contacting the developer, he presented a workaround - adding one more pixel - which worked for me.
Install SwitchResX and open it from System Preferences.
Go to Thunderbolt Display tab, and add a Custom Resolutions with Scaled Resolution at 2562 x 1440
Here's a screenshot
Save using command + s. (or simply close the window and use the prompt up)
Restart the laptop.
Go to SwitchResX and select the new custom resolution in the Current Resolution tab. (Sometimes it doesn't show up right away, play around with it and it should.)
Here you go.
I hope this answer gets to users with this setup because it is really frustrating to use 16:10 resolution on a 16:9 display.
For those unable to enable HIDPI on rMBP or new MBA, I experienced the same on my rMBP 15" with Air Display. I solved the problem by installing SwitchResX. With the boolean setting enabled as shown in the referenced gist, the HIDPI setting shows up.
Dragging seems a little laggy in Air Display, but otherwise works great.
Try this
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool YES
[from here]
If your monitor supports it, it may also be worth setting the DisplayPort version to 1.1 instead of 1.2.
I have a late 2010 Mac Air with a Samsung S27D850 display and had all sorts of intermittent resolution switching issues until I made that change.
As for me its pretty good app that give you opportunity for changing resolution any that you want.
SwitchResX for Mac and MacBook.
This app resolved all my problems with resolution.

Resources