# This file was auto generated by Styx.
# Do not edit this file directly.

import typing
import pathlib
from styxdefs import *
import dataclasses

V_1DPLOT_PY_METADATA = Metadata(
    id="ea514e31a969206c6fef70f023ec92ff968fc8c7.boutiques",
    name="1dplot.py",
    package="afni",
    container_image_tag="afni/afni_make_build:AFNI_24.2.06",
)


class V1dplotPyOutputs(typing.NamedTuple):
    """
    Output object returned when calling `v_1dplot_py(...)`.
    """
    root: OutputPathType
    """Output root folder. This is the root folder for all outputs."""
    output_image: OutputPathType
    """Output image file, default to .jpg"""


def v_1dplot_py(
    infiles: list[InputPathType],
    prefix: str,
    runner: Runner | None = None,
) -> V1dplotPyOutputs:
    """
    This program is for making images to visualize columns of numbers from 1D text
    files. It uses Python, particularly matplotlib, to create plots.
    
    Author: AFNI Team
    
    URL: https://afni.nimh.nih.gov/pub/dist/doc/program_help/1dplot.py.html
    
    Args:
        infiles: One or more file names of text files. Each column in this file\
            will be treated as a separate time series for plotting.
        prefix: Output filename or prefix. Default output image type is .jpg.
        runner: Command runner.
    Returns:
        NamedTuple of outputs (described in `V1dplotPyOutputs`).
    """
    runner = runner or get_global_runner()
    execution = runner.start_execution(V_1DPLOT_PY_METADATA)
    cargs = []
    cargs.append("1dplot.py")
    cargs.extend([
        "-infiles",
        *[execution.input_file(f) for f in infiles]
    ])
    cargs.extend([
        "-prefix",
        prefix
    ])
    cargs.append("[OTHER_OPTIONS]")
    ret = V1dplotPyOutputs(
        root=execution.output_file("."),
        output_image=execution.output_file(prefix + ".jpg"),
    )
    execution.run(cargs)
    return ret


__all__ = [
    "V1dplotPyOutputs",
    "V_1DPLOT_PY_METADATA",
    "v_1dplot_py",
]
