lets-plot icon indicating copy to clipboard operation
lets-plot copied to clipboard

Continuous scale fails if the scale limits are outside of the range of the data

Open alshan opened this issue 1 year ago • 0 comments

data=dict(
    x = [i for i in range(0, 6)],
    c = [i for i in range(0, 6)]
)    

ggplot(data)\
+ geom_point(aes(x = "x", color="c"), size=20) \
  1. Lower limit is inside the range of the data [0..5]
+ scale_color_continuous(limits=[4, 10])   

image

  1. Lower limit >= the max of the data
+ scale_color_continuous(limits=[5, 10]) 

Internal error: IllegalStateException : [ContinuousTransformWithLimits] Lower end 4.5 is outside of transform's domain.

  1. Upper limit is inside of the range of the data
+ scale_color_continuous(limits=[-1, 1])  

image

  1. Upper limit <= the min of the data
+ scale_color_continuous(limits=[-1, 0])  

Internal error: IllegalStateException : [ContinuousTransformWithLimits] Upper end 0.5 is outside of transform's domain.

alshan avatar Apr 25 '23 22:04 alshan