Commit 89709fed authored by Locatelli's avatar Locatelli
Browse files

Correct some little bugs

parent d35023d0
......@@ -208,6 +208,7 @@ void OffScreenPlotManager::run(std::string pbfilename, std::string path) {
try {
unique_ptr<view::mpl::MplFigure> figure(new view::mpl::MplFigure(*m_Mpl, false));
// return;
// DBGMSG("pbfilename = " << path << "/" << pbfilename);
boost::filesystem::path pbfile = path;
pbfile /= pbfilename;
pbfile.replace_extension("pb");
......@@ -222,7 +223,6 @@ void OffScreenPlotManager::run(std::string pbfilename, std::string path) {
buffer::Data data;
data.ParseFromArray(buffer, size);
// DBGMSG("pbfilename = " << path << "/" << pbfilename);
// DBGMSG("buffer = " << size);
// DBGMSG("numor = " << data.numor());
// DBGMSG("dataxArray = " << data.xdata_size());
......
......@@ -182,11 +182,8 @@ std::string OffScreenPlot1D::getYLabel() {
*/
void OffScreenPlot1D::plot(uint32 numplot, const std::vector<float64> &y, const std::string& label, const std::string& color)
throw (Error) {
if (m_Data.errorbars(numplot) == true) {
if ((m_Data.errorbars(numplot) == true) && (m_Data.type() != buffer::Data::Spy)) {
float64 linewidth = 0.2;
if (m_Data.type() == buffer::Data::Spy) {
linewidth = 1;
}
m_MplPlot1D.errorbar(numplot, y, label, color, "o", 2, 1, 3, linewidth);
} else {
float64 linewidth = 0.5;
......@@ -202,11 +199,8 @@ void OffScreenPlot1D::plot(uint32 numplot, const std::vector<float64> &y, const
*/
void OffScreenPlot1D::plot(uint32 numplot, const std::vector<float64> &x, const std::vector<float64> &y,
const std::string& label, const std::string& color) throw (Error) {
if (m_Data.errorbars(numplot) == true) {
if ((m_Data.errorbars(numplot) == true) && (m_Data.type() != buffer::Data::Spy)) {
float64 linewidth = 0.2;
if (m_Data.type() == buffer::Data::Spy) {
linewidth = 1;
}
m_MplPlot1D.errorbar(numplot, x, y, label, color, "o", 2, 1, 3, linewidth);
} else {
float64 linewidth = 0.5;
......
......@@ -294,9 +294,9 @@ void PropertyPlot2D::update(int32 id) {
// Update image on mpl plot
m_MplPlot2D.updateimage((int32) m_datax.size(), (int32) m_datay.size(), m_dataz);
if (m_DoProjections == true) {
updateProjections();
// Set color limits of color bar
colorLimits(m_MinColorLim, m_MaxColorLim);
updateProjections();
}
// Redraw plots
......@@ -317,10 +317,10 @@ void PropertyPlot2D::update(int32 id) {
void PropertyPlot2D::updateProjections() {
vector<size_t> lims = m_MplPlot2D.getImageBoxLimits();
// Compute new box with real of data size (reducing of ploting size view for big one)
lims[0] = lims[0] / m_XPhysicalSize * m_XDataSize;
lims[1] = lims[1] / m_XPhysicalSize * m_XDataSize;
lims[2] = lims[2] / m_YPhysicalSize * m_YDataSize;
lims[3] = lims[3] / m_YPhysicalSize * m_YDataSize;
lims[0] = (size_t) ((float64) lims[0] / (float64) m_XPhysicalSize * (float64) m_XDataSize);
lims[1] = (size_t) ((float64) lims[1] / (float64) m_XPhysicalSize * (float64) m_XDataSize);
lims[2] = (size_t) ((float64) lims[2] / (float64) m_YPhysicalSize * (float64) m_YDataSize);
lims[3] = (size_t) ((float64) lims[3] / (float64) m_YPhysicalSize * (float64) m_YDataSize);
// Compute projections of the image
computeProjections(lims);
// Reset y data limits of X projection
......@@ -411,14 +411,14 @@ void PropertyPlot2D::saveColorLimits(float64 min, float64 max) throw (Error) {
* getXDataSize
*/
uint32 PropertyPlot2D::getXDataSize() const {
return m_XDataSize;
return (uint32) m_XDataSize;
}
/*
* getYDataSize
*/
uint32 PropertyPlot2D::getYDataSize() const {
return m_YDataSize;
return (uint32) m_YDataSize;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment