FAST-HEP / fast-plotter

Manipulate binned pandas dataframes into plots
https://fast-hep.web.cern.ch
3 stars 8 forks source link

ValueError: scatter requires x column to be numeric #2

Closed benkrikler closed 5 years ago

benkrikler commented 5 years ago

Imported from gitlab issue 2

csv at: /afs/cern.ch/user/d/danthony/public/combined_signal/

(chip_env) [zw18769@soolin updated_combined_signals]$ fast_plotter /users/zw18769/CHIP/analysis/output/MC_signals/combined_signal/updated_combined_signals/tbl_dataset.njet.nbjet--weight_nominal.csv

fast_plotter - INFO - Processing: /users/zw18769/CHIP/analysis/output/MC_signals/combined_signal/updated_combined_signals/tbl_dataset.njet.nbjet--weight_nominal.csv
Traceback (most recent call last):
  File "/users/zw18769/.local/bin/fast_plotter", line 11, in <module>
    load_entry_point('fast-plotter', 'console_scripts', 'fast_plotter')()

  File "/users/zw18769/CHIP/fast-plotter/fast_plotter/__main__.py", line 45, in main
    process_one_file(infile, args)

  File "/users/zw18769/CHIP/fast-plotter/fast_plotter/__main__.py", line 67, in process_one_file
    scale_sims=args.lumi, yscale=args.yscale)

  File "/users/zw18769/CHIP/fast-plotter/fast_plotter/plotting.py", line 21, in plot_all
    plot = plot_1d_many(projected, data=data, dataset_col=dataset_col, yscale=yscale, scale_sims=scale_sims)

  File "/users/zw18769/CHIP/fast-plotter/fast_plotter/plotting.py", line 63, in plot_1d_many
    _actually_plot(df_data, kind=kind_data, label="Data", ax=main_ax)

  File "/users/zw18769/CHIP/fast-plotter/fast_plotter/plotting.py", line 52, in _actually_plot
    df.reset_index().plot.scatter(x=x_axis, y="sumw", yerr="err", color="k", label=label, ax=ax)

  File "/users/zw18769/.local/lib/python2.7/site-packages/pandas/plotting/_core.py", line 3461, in scatter
    return self(kind='scatter', x=x, y=y, c=c, s=s, **kwds)

  File "/users/zw18769/.local/lib/python2.7/site-packages/pandas/plotting/_core.py", line 2941, in __call__
    sort_columns=sort_columns, **kwds)

  File "/users/zw18769/.local/lib/python2.7/site-packages/pandas/plotting/_core.py", line 1977, in plot_frame
    **kwds)

  File "/users/zw18769/.local/lib/python2.7/site-packages/pandas/plotting/_core.py", line 1743, in _plot
    kind=kind, **kwds)

  File "/users/zw18769/.local/lib/python2.7/site-packages/pandas/plotting/_core.py", line 845, in __init__
    super(ScatterPlot, self).__init__(data, x, y, s=s, **kwargs)

  File "/users/zw18769/.local/lib/python2.7/site-packages/pandas/plotting/_core.py", line 820, in __init__

raise ValueError(self._kind + ' requires x column to be numeric')

ValueError: scatter requires x column to be numeric
benkrikler commented 5 years ago

On 2018-11-30 David Anthony (danthony) wrote:

changed the description

benkrikler commented 5 years ago

On 2018-11-30 David Anthony (danthony) wrote:

changed the description

benkrikler commented 5 years ago

On 2018-11-30 David Anthony (danthony) wrote:

changed the description

benkrikler commented 5 years ago

On 2018-11-30 David Anthony (danthony) wrote:

changed the description

benkrikler commented 5 years ago

On 2018-11-30 Benjamin Krikler (bkrikler) wrote:

changed the description

benkrikler commented 5 years ago

On 2018-11-30 Benjamin Krikler (bkrikler) wrote:

mentioned in merge request gitlab:!4

benkrikler commented 5 years ago

On 2018-11-30 Benjamin Krikler (bkrikler) wrote:

closed via merge request gitlab:!4

benkrikler commented 5 years ago

On 2018-11-30 Benjamin Krikler (bkrikler) wrote:

mentioned in commit f54a46e9a71081806b2e3f437c751ab7c5ed2cc1