# uproot.writing.identify.to_TH1x

Defined in [uproot.writing.identify](https://github.com/scikit-hep/uproot5/blob/db953cf9827349b3d24eb6742404158c1dfd5481/src/uproot/writing/identify.py) on [line 1026](https://github.com/scikit-hep/uproot5/blob/db953cf9827349b3d24eb6742404158c1dfd5481/src/uproot/writing/identify.py#L1026).

### uproot.writing.identify.to_TH1x(fName, fTitle, data, fEntries, fTsumw, fTsumw2, fTsumwx, fTsumwx2, fSumw2, fXaxis, fYaxis=None, fZaxis=None, fNcells=None, fBarOffset=0, fBarWidth=1000, fMaximum=-1111.0, fMinimum=-1111.0, fNormFactor=0.0, fContour=None, fOption='', fFunctions=None, fBufferSize=0, fBuffer=None, fBinStatErrOpt=0, fStatOverflows=2, fLineColor=602, fLineStyle=1, fLineWidth=1, fFillColor=0, fFillStyle=1001, fMarkerColor=1, fMarkerStyle=1, fMarkerSize=1.0)

* **Parameters:**
  * **fName** (*None* *or* *str*) – Temporary name, will be overwritten by the writing
    process because Uproot’s write syntax is `file[name] = histogram`.
  * **fTitle** (*str*) – Real title of the histogram.
  * **data** (numpy.ndarray or [uproot.models.TArray.Model_TArray](uproot.models.TArray.Model_TArray.html.md)) – Bin contents
    with first bin as underflow, last bin as overflow. The dtype of this array
    determines the return type of this function (TH1C, TH1D, TH1F, TH1I, or TH1S).
  * **fEntries** (*float*) – Number of entries. ([https://root.cern.ch/doc/master/classTH1.html](https://root.cern.ch/doc/master/classTH1.html))
  * **fTsumw** (*float*) – Total Sum of weights.
  * **fTsumw2** (*float*) – Total Sum of squares of weights.
  * **fTsumwx** (*float*) – Total Sum of weight\*X.
  * **fTsumwx2** (*float*) – Total Sum of weight\*X\*X.
  * **fSumw2** (None or numpy.ndarray of numpy.float64 or [uproot.models.TArray.Model_TArrayD](uproot.models.TArray.Model_TArrayD.html.md)) – Array
    of sum of squares of weights. If None, a zero-length [uproot.models.TArray.Model_TArrayD](uproot.models.TArray.Model_TArrayD.html.md)
    is created in its place.
  * **fXaxis** ([uproot.models.TH.Model_TAxis_v10](uproot.models.TH.Model_TAxis_v10.html.md)) – Use [uproot.writing.identify.to_TAxis](uproot.writing.identify.to_TAxis.html.md)
    with `fName="xaxis"` and `fTitle=""`.
  * **fYaxis** (None or [uproot.models.TH.Model_TAxis_v10](uproot.models.TH.Model_TAxis_v10.html.md)) – None generates a
    default for 1D histograms.
  * **fZaxis** (None or [uproot.models.TH.Model_TAxis_v10](uproot.models.TH.Model_TAxis_v10.html.md)) – None generates a
    default for 1D and 2D histograms.
  * **fNcells** (*None* *or* *int*) – Number of bins(1D), cells (2D) +U/Overflows. Computed
    from `data` if None.
  * **fBarOffset** (*int*) – (1000\*offset) for bar charts or legos
  * **fBarWidth** (*int*) – (1000\*width) for bar charts or legos
  * **fMaximum** (*float*) – Maximum value for plotting.
  * **fMinimum** (*float*) – Minimum value for plotting.
  * **fNormFactor** (*float*) – Normalization factor.
  * **fContour** (None or numpy.ndarray of numpy.float64 or [uproot.models.TArray.Model_TArrayD](uproot.models.TArray.Model_TArrayD.html.md)) – Array
    to display contour levels. None generates an empty array.
  * **fOption** (str or [uproot.models.TString.Model_TString](uproot.models.TString.Model_TString.html.md)) – Histogram options.
  * **fFunctions** (None, list, or [uproot.models.TList.Model_TList](uproot.models.TList.Model_TList.html.md)) – ->Pointer to
    list of functions (fits and user). None generates an empty list.
  * **fBufferSize** (*None* *or* *int*) – fBuffer size. Computed from `fBuffer` if None.
  * **fBuffer** (*None* *or* *numpy.ndarray* *of* *numpy.float64*) – Buffer of entries accumulated
    before automatically choosing the binning. (Irrelevant for serialization?)
    None generates an empty array.
  * **fBinStatErrOpt** (*int*) – Option for bin statistical errors.
  * **fStatOverflows** (*int*) – Per object flag to use under/overflows in statistics.
  * **fLineColor** (*int*) – Line color. ([https://root.cern.ch/doc/master/classTAttLine.html](https://root.cern.ch/doc/master/classTAttLine.html))
  * **fLineStyle** (*int*) – Line style.
  * **fLineWidth** (*int*) – Line width.
  * **fFillColor** (*int*) – Fill area color. ([https://root.cern.ch/doc/master/classTAttFill.html](https://root.cern.ch/doc/master/classTAttFill.html))
  * **fFillStyle** (*int*) – Fill area style.
  * **fMarkerColor** (*int*) – Marker color. ([https://root.cern.ch/doc/master/classTAttMarker.html](https://root.cern.ch/doc/master/classTAttMarker.html))
  * **fMarkerStyle** (*int*) – Marker style.
  * **fMarkerSize** (*float*) – Marker size.

This function is for developers to create TH1\* objects that can be
written to ROOT files, to implement conversion routines. The choice of
TH1C, TH1D, TH1F, TH1I, or TH1S depends on the dtype of the `data` array.
