diff --git a/density.p b/density.p index 8902f4864f829587c46edb117977341c56ac86a4..aec6e53001c00a7696b630a27989b7472cce8728 100644 --- a/density.p +++ b/density.p @@ -3,4 +3,4 @@ list = system(glob) print list set datafile separator ',' unset key -plot for [file in list] file using 2:3 every ::2 w l lw 2 lc rgb "#F00000FF" +plot for [file in list] file using 2:3 every ::2 notitle w l ls 1 lw 2 lc rgb "#F00000FF" diff --git a/eisgenerator_plot b/eisgenerator_plot index 6ca0ce949c67315e605f6d419042a8878e9b6e68..96eb0fae75a5a3fa0ac8800478bdc1c70b3d526b 100755 --- a/eisgenerator_plot +++ b/eisgenerator_plot @@ -19,5 +19,5 @@ set tics font \"Helvetica,12\"; \ set xlabel font \"Helvetica,15\"; \ set ylabel font \"Helvetica,15\"; \ set datafile separator ','; \ -plot '-' using 2:3 notitle w l ls 1; +plot '-' using 2:3 skip 3 notitle w l; " diff --git a/kissplotcsv b/kissplotcsv index 2db6116243fb6f98c92f0de879c1ab8e54306803..8e7a7c8985ff3a874c4cdd22394e87a682f78978 100755 --- a/kissplotcsv +++ b/kissplotcsv @@ -1,16 +1,15 @@ -#!/bin/sh +#!/bin/bash -e -if ! command -v eisgenerator_export &> /dev/null -then - echo "eisgenerator_export is required in \$PATH" - exit -elif ! command -v gnuplot &> /dev/null -then +if ! command -v gnuplot &> /dev/null; then echo "gnuplot is required in \$PATH" exit fi -cat "$1" | gnuplot -p -e "\ +if [[ $# < 1 ]]; then + echo "Usage: kisscsvplot [FILE]" +fi + +gnuplot -p -e "\ set terminal qt enhanced font \",15\" title \"EIS Plot\"; \ set style line 1 lw 3 lc \"blue\"; \ set ylabel 'Z_{im}'; \ @@ -19,5 +18,5 @@ set tics font \"Helvetica,12\"; \ set xlabel font \"Helvetica,15\"; \ set ylabel font \"Helvetica,15\"; \ set datafile separator ','; \ -plot '-' using 2:3 notitle w l ls 1; +plot '$1' using 2:3 notitle w l ls 3; " diff --git a/main.cpp b/main.cpp index 7c25bcc520476754a9f43d398932d77c676aa1e9..8667dca7b175035074c40c42cf93c2d1a0c07464 100644 --- a/main.cpp +++ b/main.cpp @@ -1,3 +1,4 @@ +#include <eisgenerator/eistype.h> #include <iostream> #include <complex> #include <chrono> @@ -67,11 +68,9 @@ static void runSweep(const Config& config, eis::Model& model) if(config.noise > 0) eis::noise(results, config.noise, false); - eis::Log(eis::Log::INFO)<<(config.hertz ? "freqency" : "omega")<<",real,im"; + eis::EisSpectra spectra(results, model.getModelStrWithParam(), "exported by eisgenerator_export"); - for(const eis::DataPoint& res : results) - std::cout<<(config.hertz ? res.omega/(2*M_PI) : res.omega)<<','<< - res.im.real()<<','<<(config.invert ? 0-res.im.imag() : res.im.imag())<<'\n'; + spectra.saveToStream(std::cout); eis::Log(eis::Log::INFO)<<"time taken: "<<duration.count()<<" us";