Skip to content

Commit

Permalink
Refs #4547. Remove the axis label which isn't needed for formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert-Whitley committed Jan 18, 2012
1 parent ca7ad35 commit 53ca3c3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 18 deletions.
14 changes: 7 additions & 7 deletions Code/Mantid/MantidPlot/src/ApplicationWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16881,7 +16881,7 @@ bool ApplicationWindow::runPythonScript(const QString & code, bool quiet, bool r
* Makes sure that it is dealing with a graph and then tells the plotDialog class
* to change the plot style
*
* @params plotDetails :: This includes all details of the plot [wsName, axisLabel, connectType, plotType, Errors, Color]
* @params plotDetails :: This includes all details of the plot [wsName, connectType, plotType, Errors, Color]
*/
void ApplicationWindow::setPlotType(const QStringList & plotDetails)
{
Expand All @@ -16891,9 +16891,9 @@ void ApplicationWindow::setPlotType(const QStringList & plotDetails)
}
else
{
if (plotDetails.size() > 4)
if (plotDetails.size() > 3)
{
int connectType = plotDetails[2].toInt();
int connectType = plotDetails[1].toInt();
QList<MdiSubWindow *> windows = windowsList();
foreach (MdiSubWindow *w, windows)
{
Expand All @@ -16911,10 +16911,10 @@ void ApplicationWindow::setPlotType(const QStringList & plotDetails)
{
int curveNum(-1);

if (plotDetails[3] == "Data")
if (plotDetails[2] == "Data")
{
curveNum = g->curveIndex(plotDetails[0]); //workspaceName
if (plotDetails[4] == "AllErrors") // if all errors, display all errors
if (plotDetails[3] == "AllErrors") // if all errors, display all errors
{
QwtPlotCurve *temp = g->curve(curveNum);
MantidMatrixCurve *curve = dynamic_cast<MantidMatrixCurve *>(temp);
Expand All @@ -16932,8 +16932,8 @@ void ApplicationWindow::setPlotType(const QStringList & plotDetails)
// line(0) scatter(1) line+symbol(2)
if (connectType >= 0 && connectType <= 2)
{
if (plotDetails.size() > 5)
pd->setPlotType(connectType, curveNum, plotDetails[5]);
if (plotDetails.size() > 4)
pd->setPlotType(connectType, curveNum, plotDetails[4]);
else
pd->setPlotType(connectType, curveNum);
}
Expand Down
4 changes: 0 additions & 4 deletions Code/Mantid/MantidPlot/src/Mantid/PeakPickerTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,6 @@ void PeakPickerTool::functionRemoved()
*/
void PeakPickerTool::algorithmFinished(const QString& out)
{
QString axisLabel = QString::fromStdString(m_ws->getAxis(1)->label(spec()));
m_curveFitName = workspaceName()+"_"+QString("Worksapce-Calc");
m_curveDifName = workspaceName()+"_"+QString("Workspace-Diff");

Expand All @@ -559,7 +558,6 @@ void PeakPickerTool::algorithmFinished(const QString& out)
//customise the plot
QStringList plotDetails;
plotDetails.push_back(workspaceName());
plotDetails.push_back(axisLabel);

m_fitPropertyBrowser->customisation(plotDetails);

Expand Down Expand Up @@ -887,10 +885,8 @@ void PeakPickerTool::plotGuess()

d_graph->replot();

QString axisLabel = QString::fromStdString(m_ws->getAxis(1)->label(spec()));
QStringList plotDetails;
plotDetails.push_back(m_wsName);
plotDetails.push_back(axisLabel);

m_fitPropertyBrowser->customisation(plotDetails);
}
Expand Down
6 changes: 2 additions & 4 deletions Code/Mantid/MantidQt/CustomInterfaces/src/MuonAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1638,7 +1638,6 @@ void MuonAnalysis::plotGroup(const std::string& plotType)
plotType.setNum(m_uiForm.connectPlotType->currentIndex());

plotDetails.push_back(titleLabel);
plotDetails.push_back("");
plotDetails.push_back(plotType);
plotDetails.push_back("Data");
if(m_uiForm.showErrorBars->isChecked())
Expand Down Expand Up @@ -1807,7 +1806,6 @@ void MuonAnalysis::plotPair(const std::string& plotType)
plotType.setNum(m_uiForm.connectPlotType->currentIndex());

plotDetails.push_back(titleLabel);
plotDetails.push_back("");
plotDetails.push_back(plotType);
plotDetails.push_back("Data");
if(m_uiForm.showErrorBars->isChecked())
Expand Down Expand Up @@ -2912,9 +2910,9 @@ void MuonAnalysis::assignPeakPickerTool(const QString & workspaceName)

/**
* Set up the string that will contain all the data needed for changing the data.
* [wsName, axisLabel, connectType, plotType, Errors, Color]
* [wsName, connectType, plotType, Errors, Color]
*
* @param plotDetails :: The workspace name of the plot to be created and axis label.
* @param plotDetails :: The workspace name of the plot to be created.
*/
void MuonAnalysis::changeDataPlotType(const QStringList & plotDetails)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ void MuonAnalysisFitDataTab::groupFittedWorkspaces(QString workspaceName)

/**
* Set up the string that will contain all the data needed for changing the data.
* [wsName, axisLabel, connectType, plotType, Errors, Color]
* [wsName, connectType, plotType, Errors, Color]
*
* @param plotDetails :: The workspace name of the plot to be created and axis label.
* @param plotDetails :: The workspace name of the plot to be created.
*/
QStringList MuonAnalysisFitDataTab::getAllPlotDetails(const QStringList & plotDetails)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2106,7 +2106,7 @@ void FitPropertyBrowser::clearAllPlots()
/**
* Customise the plot if it is a custom fitting. (i.e part of muon analysis)
*
* @param plotDetails :: The name of the workspace plot to be customised and the axis label seperated by a '.'
* @param plotDetails :: The name of the workspace plot to be customised seperated by a '.'
*/
void FitPropertyBrowser::customisation(const QStringList& plotDetails)
{
Expand Down

0 comments on commit 53ca3c3

Please sign in to comment.