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

[BUGZILLA #15782] (semi-)transparent "grid" elements disappear in the graphics device upon resizing #5324

Open
MichaelChirico opened this issue May 18, 2020 · 3 comments

Comments

@MichaelChirico
Copy link
Owner

Created attachment 1594 [details]
new window with all 3 lines, only the opaque line remains after resizing the window.

if you plot something like

library("grid")
pushViewport(viewport())
grid.segments(.25,.25,.75,.75,gp=gpar(col=gray(0,.25)))
grid.segments(.25,.75,.75,.25,gp=gpar(col=gray(0,.75)))
grid.abline(.5,0)
popViewport()

using the "grid" package, all 3 lines are displayed correctly upon opening a new device - if the graphics window is resized, the transparent elements disappear (see screenshot). line width, etc. do not affect this behavior.
resizing the graphics device works fine under debian and kubuntu, so i guess it's windows-specific.

thx_m


METADATA

  • Bug author - Marco Maier
  • Creation time - 2014-04-26 17:39:51 UTC
  • Bugzilla link
  • Status - NEW
  • Alias - None
  • Component - Windows GUI / Window specific
  • Version - R-devel (trunk)
  • Hardware - All All
  • Importance - P5 major
  • Assignee - Marco Maier
  • URL -
  • Modification time - 2015-05-11 05:40 UTC
@MichaelChirico
Copy link
Owner Author

Created attachment 1821 [details]
disappearing semitransparent lines using grid

# this bug is still reproducible in R 3.2.0 and R-devel.
# short code example to show the behavior of base graphics vs. grid.

# setting up colors
y <- seq(0, 255)
w <- abs(seq(-255, 255, length.out = 256)) # transparency
greenred <- rgb(y, 255-y, y*0, alpha = w, maxColorValue = 255)

# lines with alpha < 1 are displayed when resizing a "base graphics" window:
plot(NA, type = "n", xlim = c(0, 255), ylim = c(0, 1))
segments(y, 0, y, 1, col = greenred)

# in "grid", resizing the window causes all alpha < 1 lines to disappear:
dev.new()
library("grid")
pushViewport(viewport(xscale = c(-.1, 1.1), yscale = c(-.1, 1.1)))
grid.segments(y/255, 0, y/255, 1, gp = gpar(col = greenred), default.units = "native")
popViewport()


METADATA

  • Comment author - Marco Maier
  • Timestamp - 2015-05-02 09:41:11 UTC

INCLUDED PATCH

@MichaelChirico
Copy link
Owner Author

This is not reproducible on ...

R.version
           _                                                 

platform x86_64-unknown-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status Under development (unstable)
major 3
minor 2.0
year 2015
month 03
day 11
svn rev 67980
language R
version.string R Under development (unstable) (2015-03-11 r67980)
nickname Unsuffered Consequences


METADATA

  • Comment author - Paul Murrell
  • Timestamp - 2015-05-04 23:25:39 UTC

@MichaelChirico
Copy link
Owner Author

(In reply to Paul Murrell from comment #2)

This is not reproducible on ...

> R.version
_                                                 
platform       x86_64-unknown-linux-gnu                          
arch           x86_64                                            
os             linux-gnu                                         
system         x86_64, linux-gnu                                 
status         Under development (unstable)                      
major          3                                                 
minor          2.0                                               
year           2015                                              
month          03                                                
day            11                                                
svn rev        67980                                             
language       R                                                 
version.string R Under development (unstable) (2015-03-11 r67980)
nickname       Unsuffered Consequences

this problem is windows-specific - debian, kubuntu, etc. work fine (couldn't test it on a mac). just reproduced this on another windows machine:
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status Patched
major 3
minor 2.0
year 2015
month 05
day 07
svn rev 68343
language R
version.string R version 3.2.0 Patched (2015-05-07 r68343)
nickname Full of Ingredients


METADATA

  • Comment author - Marco Maier
  • Timestamp - 2015-05-11 05:40:53 UTC

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

No branches or pull requests

1 participant