Code Monkey home page Code Monkey logo

mipt_plot's Introduction

MIPT_Plot

  • Simple script for quick plots creation
  • Automatic calculations of coefficients by least squares with errors LaTeX
  • It's a beta version now, need to be improved
  • Gives an excellent result in LaTeX, other terminals are to be developed further

Look examples for settings description. Running:

python MIPT_Plot.py [myfile.dat]

###Instruction (in Russian):

  1. Создаём файл произвольного формата следующего содержания (назначения настроек понятны из комментариев, обязательно указывать только output):
# Это комментарий

# Требуются ли погрешности по Ox, Oy
x_error: 0
y_error: 1

# Границы осей (опционально)
x_limits: 0 15
y_limits: 0 70

# Имя выходного файла
output: plot1.tex

# Подписи осей
x_title: $I,$ А
y_title: $B$, мТл

# При значении label=1 на графике отображается подпись с угловым коэффициентом
label: 1

# Координаты подписи на графике
label_x: 1
label_y: 60

# Единицы измерения
label_text: " $\\frac{\\text{мТл}}{\\text{А}}$"
label_size: 15

# Выбор терминала для gnuplot, поддерживает опции
term: epslatex

# Данные по колонкам
data:
### |x|y|xerr|yerr| ###

# В данных поддерживаются как запятые:
1   5  1,4
# Так и точки:
2   7  1.6
3  11  3
4  15  4
5  16  5
6  18  6
7  23  6
8  27  7
9  33  8
10 38  8
11 48  9
12 58  9
13 67 10
  1. Запускаем командой вида

python MIPT_Plot.py [myfile.dat]

  1. Получаем предпросмотр картинки, после нажатия Enter в терминале всё закрывается, создаётся файл выбранного формата.
  2. Profit!
  3. Tex Users: по-умолчанию терминал epslatex, выходной файл указываем [smth].tex, два выходных файла [smth].tex и [smth].eps кидаем в папку с документом, подключаем командой вида
\begin {figure}[H]
\begin{center}
\input{[smth]}
\caption{Пробный график}
\end{center}

mipt_plot's People

Contributors

gkorepanov avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.