RDataFrame Histo1D: plot vector element

Dear expert,

I’m trying to plot with Histo1D in RdataFrame only some elements of the branch, the branch being a vector.
Trying for example things like Histo1D('var.at(0)') or Histo1D('var[0]) do not work well.
Is there a way to do so without having to first Define a new variable?


Hi @clementhelsens,
Histo1D takes column names as arguments, not expressions, so yep the way to achieve what you want is to first Define a new column with the content you want and then call Histo1D on that.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.