This Project is for the TU-Berlin Course "Julia Programming for Machine Learning"
Please make sure, that Julia 1.10 is used!
This Module will return you a nice Scene you can use to display your Data with Parallel Coordinates

This Module was created with PkgTemplates.jl
Parallel coordinates transform high-dimensional data into a 2D visualization by aligning axes parallel to each other. Key transformations include:
Shifting the origin of a coordinate system from
To compare variables on different scales, data is normalized to
For rotated axes by angle
$$
x' &= x \cos \alpha + y \sin \alpha \
y' &= -x \sin \alpha + y \cos \alpha
\end{align*}
$$
These principles underpin how parallel coordinates handle scaling and alignment of axes.
Please refer to this Link for Installation of Julia
You need to use the package (1-3) and install the dependencies (4-5)
- Open Julia with
juliain your command prompt - Open the package manager with
] - Using our Package
-
activate /path/to/package
or
activate .when Julia was opened with command prompt already in package path -
you will then see:
(ParallelPlots) pkg>
-
- go back to
julia>by pressingCMD+C Import ParallelPlotsto download Dependencies and use the Package from Command Line
| Parameter | Default | Example | Description |
|---|---|---|---|
| normalize::Bool | false | normalize=true | If the Data should be normalized (min/max) |
| title::String | "" | title="My Title" | The Title of The Figure, |
| colormap | :viridis | colormap=:thermal | The Colors of the Lines |
| color_feature | nothing | color_feature="weight" | The Color of the Lines will be based on the values of this selected feature. If nothing, the last feature will be used |
| feature_labels | nothing | feature_labels=["Weight","Age"] | Add your own Axis labels, just use the exact amount of labes as you have axis |
| feature_selection | nothing | feature_selection=["weight","age"] | Select, which features should be Displayed. If color_feature is not in this List, use the last one |
| curve | false | curve=true | Show the Lines Curved |
| show_color_legend | nothing | show_color_legend=true | Show the Color Legend. If parameter not set & color_feature not shown, it will be displayed automaticly |
julia> using ParallelPlots
julia> parallelplot(DataFrame(height=160:180,weight=60:80,age=20:40))
# If you want to normalize the Data, you can add the value normalized=true, default is false
julia> parallelplot(DataFrame(height=160:180,weight=reverse(60:80),age=20:40),normalize=true)
# If you want to set the size of the plot (default width:800, height:600)
julia> parallelplot( DataFrame(height=160:180,weight=60:80,age=20:40), figure = (resolution = (300, 300),) )
# You can update as well the Graph with Observables
julia> df_observable = Observable(DataFrame(height=160:180,weight=60:80,age=20:40))
julia> fig, ax, sc = parallelplot(df_observable)
# If you want to add a Title for the Figure, sure you can!
julia> parallelplot(DataFrame(height=160:180,weight=reverse(60:80),age=20:40),title="My Title")
# If you want to specify the axis labels, make sure to use the same number of labels as you have axis!
julia> parallelplot(DataFrame(height=160:180,weight=reverse(60:80),age=20:40), feature_labels=["Height","Weight","Age"])
# Adjust Color and and feature
parallelplot(df,
# You choose which axis/feature should be in charge for the coloring
color_feature="weight",
# you can as well select, which Axis should be shown
feature_selection=["height","age","income"],
# and label them as you like
feature_labels=["Height","Age","Income"],
# you can change the ColorMap (https://docs.makie.org/dev/explanations/colors)
colormap=:thermal,
# ...and can choose to display the color legend.
# If this Attribute is not set,
# it will only show the ColorBar, when the color feature is not in the selected feature
show_color_legend = true
)
Please read the Docs for further Information
-
Using the Package
-
activate /path/to/package
or
activate .when Julia was opened with command prompt already in package path -
you will then see:
(ParallelPlots) pkg>
-
-
Running commands
- Adding external Dependencies
add DepName
- Run Tests to check if Package is still working as intended
test
- Build
build
- Precompile
precompile
- Adding external Dependencies
- move to
./docsfolder with command line - run
julia --project make.jl