Skip to main content

Bradley Day's personal library

Project description

bradLib

A simple personal library. Currently contains csv2tab and plotter. Will update as I create more utilities.

bradLib.csv2tab(file, caption = "", alignment = "")

Usage

Parameters Type
file str The path to the csv file, either relative or absolute
caption str Text to go in the table caption
alignment str The alignment for each column, must match the number of columns. Can be: l,r, or c for left, right or centered

csv formatting

Data columns should have the intended headers including units e.g.

"x position"

Error columns must contain "Error" e.g.

"xError"

bradLib.plotter(title = None, figsize=(8,5))

Usage

Parameters Type
title str The plot title
figsize tuple The dimensions for the produced figure

Initialise a plotter object as

plot = plotter("title", figsize = (8,5))

plotter.save(name)

Parameters Type
name str The filename for the produced image

plotter.plot(data, xyLabels = [None, None], label=None, legendLoc="best")

Parameters Type
data array-like The data to be plotted , formatted as [x, y] where x and y are 1-D arrays of same length
xyLabels tuple The axis labels for the plot
label str The label for the data, used alongside a legend
legendloc str The location to place the legend

plotter.scatter(data, xyLabels = [None, None], label=None, legendLoc="best", colour=None, markerSize=10, markerStyle = "o")

Parameters Type
data array-like The data to be plotted , formatted as [x, y] where x and y are 1-D arrays of same length
xyLabels tuple The axis labels for the plot
label str The label for the data, used alongside a legend
legendloc str The location to place the legend
colour str The colour for the markers
markerSize int The size for the markers
markerStyle str The style for the markers

Note: Check matplotlib documentation for colour, markersize and markerstyle usage

plotter.errorbar(data, errorbars)

Parameters Type
data array-like The data to be plotted , formatted as [x, y] where x and y are 1-D arrays of same length
errorbars array-like The data to be plotted , formatted as [xError, yError]

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

bradlib-1.3.2.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bradlib-1.3.2-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file bradlib-1.3.2.tar.gz.

File metadata

  • Download URL: bradlib-1.3.2.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bradlib-1.3.2.tar.gz
Algorithm Hash digest
SHA256 57831a02a1ad7c42e9d43fe365e8bee74dd0db23011769edfd872271b60b3018
MD5 2285f052e85f5e7110b26dcc7d80b07a
BLAKE2b-256 cd1ce9000da0add7b136293c6bc24a6092d3000f9f250fe16542bc3dd3a29ac8

See more details on using hashes here.

Provenance

The following attestation bundles were made for bradlib-1.3.2.tar.gz:

Publisher: python-publish.yml on BradADDay/bradLib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bradlib-1.3.2-py3-none-any.whl.

File metadata

  • Download URL: bradlib-1.3.2-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bradlib-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bb378d3d9df8a54d8c43c27de82434b376fb1631152b241aeb23631425fc7c13
MD5 995233d7a92ae895e2e47cd289cd6583
BLAKE2b-256 443fd31fcd6b4e7f16eb04c7acfb81b557ca54521e63293c28d1303f49896dcb

See more details on using hashes here.

Provenance

The following attestation bundles were made for bradlib-1.3.2-py3-none-any.whl:

Publisher: python-publish.yml on BradADDay/bradLib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page