4242
4343# Constructors
4444```julia
45- ParallelPlots.create_parallel_coordinates_plot(data::DataFrame; normalize::Bool=false)
45+ ParallelPlots.create_parallel_coordinates_plot(data::DataFrame; normalize::Bool=false, scene_width::Integer=800, scene_height::Integer=600 )
4646```
4747
4848# Arguments
@@ -57,12 +57,15 @@ julia> ParallelPlots.create_parallel_coordinates_plot(DataFrame(height=160:180,w
5757# If you want to normalize the Data, you can add the value normalized=true, default is false
5858julia> ParallelPlots.create_parallel_coordinates_plot(DataFrame(height=160:180,weight=reverse(60:80),age=20:40),normalize=true)
5959
60+ # If you want to set the size of the plot (default width:800, height:600)
61+ julia> ParallelPlots.create_parallel_coordinates_plot( DataFrame(height=160:180,weight=60:80,age=20:40), scene_width=200, scene_height=200 )
6062
6163```
6264
6365
6466"""
65- function create_parallel_coordinates_plot (data:: DataFrame ; normalize:: Bool = false )
67+ function create_parallel_coordinates_plot (data:: DataFrame ; normalize:: Bool = false , scene_width:: Integer = 800 , scene_height:: Integer = 600 )
68+ input_check (data)
6669
6770 input_check (data)
6871
@@ -78,15 +81,15 @@ function create_parallel_coordinates_plot(data::DataFrame; normalize::Bool=false
7881 limits = [(minimum (col), maximum (col)) for col in parsed_data]
7982
8083 let
81- scene = Scene (camera = campixel!)
82- # TODO : Scene(resolution = (1200, 900 ), camera=campixel!)
84+ # creates the Scene for the Plot
85+ scene = Scene (resolution = (scene_width, scene_height ), camera= campixel!)
8386 numberFeatures = length (parsed_data) # Number of features, equivalent to the X Axis
8487 sampleSize = size (data, 1 ) # Number of samples, equivalent to the Y Axis
8588
8689 # Plot dimensions
87- width = 600
88- height = 400
89- offset = 100
90+ width = scene_width * 0.75 # 75% of scene width
91+ height = scene_height * 0.75 # 75% of scene width
92+ offset = min (scene_width, scene_height) * 0.15 # 15% of scene dimensions
9093
9194 # Create axes
9295 for i in 1 : numberFeatures
0 commit comments