xlim! / ylim!
Arguments:
v :: VegaVisualization
min :: Real = 0
max :: Real = 1000
reverse :: Bool = false
round :: Bool = false
_type :: AbstractString = ""
exponent :: Real = 0.3
This function mutates :VegaVisualization
, modifying the properties of the scales underlying the axes.
Note that for the exponent
keyword, it is only in effect if _type
is set to "pow"
. The default value for "pow"
of 0.3
is arbitrary, chosen so that setting _type
to "pow"
actually does something (the d3/vega default = 1
, which is an identity transformation).
Default Axis limits
using Vega
x = [ 1 : 100 ; 1 : 100 ]
y = [[ 1 : 100 ] + randn ( 100 ); 3.0 + 1.5 * [ 1 : 100 ] + randn ( 100 )]
group = [[ 1 for i in 1 : 100 ]; [ 2 for i in 1 : 100 ]]
v = lineplot ( x = x , y = y , group = group )
Modified Axis limits
xlim! ( v , min = 0 , max = 200 )
ylim! ( v , min = 0 , max = 200 )
Log Scale (Y-axis)
x = [ 1 : 100 ; 1 : 100 ]
y = [[ 1 : 100 ] + randn ( 100 ); 3.0 + 1.5 * [ 1 : 100 ] + randn ( 100 )]
group = [[ 1 for i in 1 : 100 ]; [ 2 for i in 1 : 100 ]]
v = lineplot ( x = x , y = y , group = group )
ylim! ( v , _type = "log" )
sqrt Scale (Y-axis)
x = [ 1 : 100 ; 1 : 100 ]
y = [[ 1 : 100 ] + randn ( 100 ); 3.0 + 1.5 * [ 1 : 100 ] + randn ( 100 )]
group = [[ 1 for i in 1 : 100 ]; [ 2 for i in 1 : 100 ]]
v = lineplot ( x = x , y = y , group = group )
ylim! ( v , _type = "sqrt" )
Power Scale (Y-axis, default exponent = 0.3)
x = [ 1 : 100 ; 1 : 100 ]
y = [[ 1 : 100 ] + randn ( 100 ); 3.0 + 1.5 * [ 1 : 100 ] + randn ( 100 )]
group = [[ 1 for i in 1 : 100 ]; [ 2 for i in 1 : 100 ]]
v = lineplot ( x = x , y = y , group = group )
ylim! ( v , _type = "pow" )