A simple, cross-platform Julia tool to visualize 2-column CSV data interactively.
- Cross-platform: Works on Linux, Windows, and macOS
- Interactive plots: Supports interactive visualization
- Multiple plot types: Line, scatter, bar, and histogram plots
- Customizable: Set titles, axis labels, and dimensions
- Save capability: Export plots to image files
- Standalone executable: Can be compiled to run without Julia installed
- Julia 1.8 or higher
- Required packages: ArgParse, CSV, DataFrames, Plots
# Clone the repository
git clone https://github.com/IJ1TI/testDashboard.git
cd testDashboard
# Install dependencies (first time only)
julia --project -e 'using Pkg; Pkg.instantiate()'
# Run the plotter
julia --project csv_plotter.jl sample_data.csvusing Pkg
Pkg.add(url="https://github.com/IJ1TI/testDashboard.git")Build a standalone executable that includes the Julia runtime:
# Clone the repository
git clone https://github.com/IJ1TI/testDashboard.git
cd testDashboard
# Install PackageCompiler (if not already installed)
julia -e 'using Pkg; Pkg.add("PackageCompiler")'
# Build the standalone executable
julia build_standalone.jl
# Run the executable (no Julia installation needed)
./csv_plotter sample_data.csv --title "My Plot"Note: The standalone executable will be larger (~50-100MB) as it includes the Julia runtime.
:: Build
julia build_standalone.jl
:: Run
csv_plotter.exe data.csv --title "My Plot"# Make executable
chmod +x csv_plotter
# Run
./csv_plotter data.csv --title "My Plot"# Plot a CSV file with default settings
julia --project csv_plotter.jl data.csv
# With custom labels and title
julia --project csv_plotter.jl data.csv --xlabel "Time" --ylabel "Value" --title "My Data"
# As a scatter plot
julia --project csv_plotter.jl data.csv --type scatter
# Save plot to file
julia --project csv_plotter.jl data.csv --save plot.png
# Non-interactive mode
julia --project csv_plotter.jl data.csv --interactive falseUsage: julia csv_plotter.jl [filename.csv] [options]
Options:
--xlabel XLABEL Set x-axis label (default: "X")
--ylabel YLABEL Set y-axis label (default: "Y")
--title TITLE Set plot title (default: "CSV Data Plot")
--type PLOT_TYPE Set plot type: line, scatter, bar, histogram (default: line)
--interactive Use interactive backend (default: true)
--save FILENAME Save plot to file
--width WIDTH Plot width in pixels (default: 800)
--height HEIGHT Plot height in pixels (default: 600)
--help Show help
The CSV file must have exactly 2 columns. The first column is used for x-values, the second for y-values.
Example data.csv:
x,y
1,2
2,4
3,6
4,8
5,10The tool automatically selects the best available backend:
- GR (default): Fast, works well cross-platform
- Plotly: Web-based interactive plots
- PyPlot: Matplotlib-based plots
For best interactive experience, install the GR backend:
using Pkg
Pkg.add("GR")- Install Julia from https://julialang.org/downloads/
- Add Julia to PATH during installation
- Open Command Prompt and navigate to the repository
- Run the plotter as shown above
Create plot.bat:
@echo off
julia --project csv_plotter.jl %1 %2 %3 %4 %5 %6 %7 %8 %9Then run:
plot.bat data.csv --title "My Plot"# Ubuntu/Debian
sudo apt install julia
# Fedora
sudo dnf install julia
# Arch Linux
sudo pacman -S juliaCreate csv-plot:
#!/bin/bash
julia --project "$(dirname "$0")/csv_plotter.jl" "$@"Make it executable:
chmod +x csv-plotThen run:
./csv-plot data.csv --title "My Plot"julia --project csv_plotter.jl sample_data.csv --title "Linear Data"julia --project csv_plotter.jl sample_data.csv --type scatter --title "Scatter Plot"julia --project csv_plotter.jl sample_data.csv --type bar --title "Bar Chart"julia --project csv_plotter.jl sample_data.csv --type histogram --ylabel "Frequency"To create a standalone executable that runs without Julia installed:
- Julia 1.8+ (only needed for building, not for running the final executable)
- PackageCompiler.jl package
-
Install PackageCompiler (if not already installed):
using Pkg Pkg.add("PackageCompiler")
-
Build the executable:
julia build_standalone.jl
-
Run the executable:
# Linux/macOS ./csv_plotter data.csv --title "My Plot" # Windows csv_plotter.exe data.csv --title "My Plot"
- The first build may take several minutes
- The executable will be ~50-100MB in size
- The executable includes the Julia runtime and all dependencies
- First run of the executable may take a few seconds to initialize
Run:
using Pkg
Pkg.instantiate()Try specifying a different backend:
using Plots
plotly() # or pyplot(), or gr()Ensure your CSV has exactly 2 columns and uses commas as separators.
MIT License
Feel free to submit issues and pull requests!