Opened 11 years ago
Closed 11 years ago
#195 closed task (fixed)
Refactor the various Plot classes
Reported by: | MatthewWhiting | Owned by: | MatthewWhiting |
---|---|---|---|
Priority: | normal | Milestone: | Release-1.5 |
Component: | Code base | Version: | 1.4 |
Severity: | normal | Keywords: | |
Cc: |
Description
Several improvements:
- Use inheritance to better associate the classes
- Split into different files, one for each class (hard to follow currently)
- Perhaps in a new directory?
- Inheritance will simplify the code, removing repeated stuff.
Change History (5)
comment:1 Changed 11 years ago by
Status: | new → assigned |
---|
comment:2 Changed 11 years ago by
comment:3 Changed 11 years ago by
Not clear what should happen to void plotWCSaxes(struct wcsprm *wcs, size_t *axes, int textColour, int axisColour)
Would it be better to put this in Utils, as it is a reasonably generic front-end to cpgsbox that doesn't require any of the other Duchamp classes.
Perhaps a new file Utils/PlottingUtilities?.cc?
comment:4 Changed 11 years ago by
Here's a possible arrangement:
- DuchampPlot - base class, handles size of page & identifier
- ImagePlot - largely as it is, devolving basic stuff to DuchampPlot
- MultipleDuchampPlot - base class for plots with multiple entries on a page
- CutoutPlot - largely as is.
- SpectralPlot - largely as is
- SimpleSpectralPlot - while this isn't strictly a multiple plot, it is basically the spectralPlot but with different bounds for the main plot and a different label function. Most of the underlying stuff is the same though. It also requires access to similar functions (such as the flagged channel marking).
comment:5 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
Have two functions in plotting.cc called drawSpectralRange - one which takes a SpectralPlot? object, and one taking a SimpleSpectralPlot? object.
These should be unified by making use of the inheritance, and really put within the class to act as frontends to the drawVelRange function.