81 std::map<std::string, std::pair <double, double> >
m_ranges;
92 const std::vector < std::string > & bindings );
117 const std::vector< std::string > & bindings );
125 const std::vector< std::string > & bindings );
133 const std::vector< std::string > & bindings );
140 const std::vector< std::string > & bindings,
148 const std::vector < std::string > & bindings );
155 const std::vector < std::string > & bindings );
176 const std::vector < std::string > & bindings );
183 const std::vector < std::string > & bindings );
200 const std::vector<PyDataRep *> &
getDataReps ()
const;
204 void setTitle (
const std::string & title );
207 const std::string &
getTitle()
const;
211 void setLabel (
const std::string & axis,
const std::string & label );
214 const std::string &
getLabel(
const std::string &axis)
const;
217 void setNumberOfBins (
const std::string & axis,
unsigned int number );
220 double getBinWidth (
const std::string & axis )
const;
223 void setBinWidth (
const std::string & axis,
double width,
228 void setBinWidth (
const std::string & axis,
double width );
231 void setOffset (
const std::string & axis,
double offset );
234 void setRange (
const std::string & axis,
double low,
double high,
239 void setRange (
const std::string & axis,
double low,
double high );
242 std::vector<double>
getRange (
const std::string & axis );
258 int nextView (
bool stepForward =
true );
274 void setLog (
const std::string & axis,
int flag );
277 int getLog (
const std::string & axis );
298 void addValues (
const std::vector < double > &
v );
334 void setTicks (
const std::string & axis,
335 const std::vector < double > & values,
336 const std::vector < std::string > & labels );
356 void applyCuts (
const std::vector < QtDisplay * > & cuts );
367 #endif // _QtDisplay_H_
int saveView()
Save the current set of plot ranges which define a "view" for this plot.
void setTitle(const std::string &title)
Sets the title of the display.
void setPointRep(RepBase *rep)
Sets the PointRep for the display.
PyNTuple * createNTuple() const
Creates and returns an PyNTuple representing the display.
const std::string & getTitle() const
Returns the title of the display.
void setOffset(const std::string &axis, double offset)
Sets the offset of the bins on the specified axis.
int currentView()
Return the current view index.
int nextView(bool stepForward=true)
Cycle through each set of plot ranges, thereby changing the view with each call.
void unlock()
Unlock the QApplication in case of exception.
void update()
Updates the display.
const std::vector< PyDataRep * > & getDataReps() const
Returns a vector of all DataReps in the plotter.
void createDisplay(const std::string &type, const DataSource &nt, const std::vector< std::string > &bindings)
Create a QtDisplay.
A wrapper class for Python tuple objects.
void setColorMap(const std::string &name)
Set the color map by name.
int getLog(const std::string &axis)
Return 1 if the specified axis is logarithmically scaled.
void applyCuts(const std::vector< QtDisplay * > &cuts)
Applies a cuts to the wrapped PlotterBase.
void setTransform(const std::string &name)
Sets the Transform.
void reset()
Resets all bins.
void setAutoRanging(const std::string &axis, bool flag)
Sets the auto ranging flag on specified axis.
int numViews()
Return the number of stored views.
std::map< std::string, double > m_binWidths
The saved X and Y bin widths to be used with the resize() method.
void setAspectRatio(double ratio)
Sets the aspect ratio.
void applyCut(QtDisplay *cut)
Applies a cut to the wrapped PlotterBase.
QtDisplay()
A default constructor for derived classes.
void setBinWidth(const std::string &axis, double width, bool save=false)
Sets the bin width on the specified axis.
A wrapper for RootNTuple, so that when RootNTuple is used in Qt based application, the application object can be locked and unlocked before calling any ROOT functions.
void setAutoTicks(const std::string &axis, bool yes)
Sets the ticks to be automatic or manual.
The base class for the PlotterBase hierarchy.
void addFunction(FunctionBase *function)
Adds a Function (as a FunctionBase object)
int plotterId() const
Return the Id to the plotter object.
void setContourLevels(const std::vector< double > &levels)
Set the contour levels if a ContourPointRep.
PyArray_TYPES type(numeric::array arr)
PyDataSource * createDataArray() const
Creates a data array wrapper for the contents of the display.
void setTicks(const std::string &axis, const std::vector< double > &values, const std::vector< std::string > &labels)
Sets the axis ticks to specified points and values.
PlotterBase * m_plotter
The contained PlotterBase object.
void addObserver(hippodraw::Observer *observer)
Adds an observer to PlotterBase object.
void setRange(const std::string &axis, double low, double high, bool save=false)
Sets the Range on the specified axis.
void setView(int index)
Set the view by index.
This class is the public interface to a DataSource object that the user sees as the DataArray object ...
Part of an implementation of the Observable Observer pattern based on the example implementation in t...
PlotterBase * display()
Returns the wrapped display object.
const std::string & getLabel(const std::string &axis) const
Returns the label on the specified axis.
This class is the public Python interface wrap for the FunctionRep class.
A function that can be added to a DataRep and used in a fitter.
void setLabel(const std::string &axis, const std::string &label)
Sets the label on the corresponding axis.
Qt Displays wraps a derived class of PlotterBase.
double numberOfEntries() const
Return the number of entries in the display.
void setNumberOfBins(const std::string &axis, unsigned int number)
Sets the number of bins.
std::vector< double > getRange(const std::string &axis)
Get the Range of the specified axis.
void addDataRepStacked(const std::string &type, const DataSource *ntuple, const std::vector< std::string > &bindings)
Adds a DataRep to the display by stacking, i.e.
void resize()
Restore the X and Y dimensions of the display to their saved values.
A wrapper for NTuple, so that when NTuple is used in Qt based application, the application object can...
void addValues(const std::vector< double > &v)
Adds the values to the display.
std::map< std::string, std::pair< double, double > > m_ranges
The saved X and Y ranges to be used with the resize() method.
std::vector< PyDataRep * > m_pyDataReps
A vector to store the PyDataRep pointers to be returned by reference via the getDataReps() method...
void deleteView(int index)
Delete a view by index.
A wrapper class for Python list objects.
void addDataRep(const std::string &type, const DataSource *ntuple, const std::vector< std::string > &bindings)
Creates and adds a DataRep to the display.
void setLog(const std::string &axis, int flag)
Sets the specified axis to Logarithmic binning (if applicable ) and display.
double getBinWidth(const std::string &axis) const
Returns the bin width on the specified axis.
The base class for the point representation hierarchy.
PyDataRep * getDataRep()
Returns the selected DataRep in the plotter.
This class is the public interface the what the user sees as the DataRep object from Python...
Base class for DataSource.