Plotting_graphs
Project description
This is my package for plotting approximations
Installation:
pip install plot-yar
Descrition:
plot_yar.plot_approx(X_data, Y_data, input_function, plot_name='plot_name', plot_title='plot_title', x_label='x_label', y_label='y_label', Y_absolute_sigma = 0, scientific_view = True, print_cross = True, save_as_csv = False, to_latex = False, save_fig=True):
Parameters:
- X_data: array_like.
X-axis data
- Y_data: array_like.
Y-axis data
- input_function: string.
Approximation function.You could use template functions from dict or your own funcitons:
</code></pre> </blockquote> </blockquote> <p>input_function = 'linear' fun_examples = {'linear':'a0<em>x+a1', 'poly_2':'a0</em>x<strong>2+a1<em>x+a2', 'poly_3':'a0</em>x</strong>3+a1<em>x**2+a2</em>x+a3','exp':'e^(a0<em>x+a1)+a2', 'ln':'ln(a0</em>x+a1)+a2'}</p> <blockquote> <ul> <li><strong>plot_name:</strong> string.<br /> Name of your plot (picture)</li> </ul> </blockquote> <blockquote> <ul> <li><strong>plot_title:</strong> string.<br /> Your plot title</li> </ul> </blockquote> <blockquote> <ul> <li><strong>y_label:</strong> string.<br /> Y-axis label</li> </ul> </blockquote> <blockquote> <ul> <li><strong>x_label:</strong> string.<br /> X-axis label</li> </ul> </blockquote> <blockquote> <ul> <li><strong>Y_absolute_sigma:</strong> float or array_like.<br /> Absolute Y-axis data error</li> </ul> </blockquote> <blockquote> <ul> <li><strong>scientific_view:</strong> bool. (default True)<br /> If True numbers will be written as $6.7 E + 01$ instead $670$</li> </ul> </blockquote> <blockquote> <ul> <li><strong>print_cross:</strong> bool. (default True)<br /> Print crosses error or not?</li> </ul> </blockquote> <blockquote> <ul> <li><strong>to_latex:</strong> bool. (default False)<br /> If True save table of estimated coeffs to latex table, you could use this package:</li> </ul> <pre lang="latex"><code>\usepackage{booktabs}
- save_as_csv: bool. (default False)
If True save table of estimated coeffs to csv table
- save_fig: bool. (default True)
If True create a folder "pictures" and save plot to .pngExample:
- in:
import plot_yar.plot_approx as plot_approx plot_approx([[1,2,3]], [[2,3,5]], 'linear')
- out:
Coeffs table 0: coeffs coeffs_values standard error relative se, % 0 a_0 1.500E+00 8.333E-02 5.556E+00 1 a_1 3.333E-01 3.889E-01 1.167E+02 Standart_error_Y_0 = 2.357E-01
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
plot_yar-0.3.tar.gz
(4.9 kB
view hashes)
Built Distribution
plot_yar-0.3-py3-none-any.whl
(5.6 kB
view hashes)