Summary: | Images shouldn't default to Y-axis autoborder, X-axis auto range | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Matthew Truch <matt> |
Component: | general | Assignee: | kst |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Matthew Truch
2005-11-09 01:12:31 UTC
These properties belong to a plot and not to an image. At present the default for all plots is as you describe, regardless of whether they contain curves and/or images. I can't think of any simple to improve upon this, other than have the user manaually change the plot setting if so desired. One possibility might be to change the setting automatically if the plot contains only images, but it is not considered very polite to change settings without user intervention. On Wed, Nov 16, 2005 at 09:08:54PM -0000, Andrew Walker wrote:
> These properties belong to a plot and not to an image. At present the
> default for all plots is as you describe, regardless of whether they
> contain curves and/or images. I can't think of any simple to improve
> upon this, other than have the user manaually change the plot setting
> if so desired. One possibility might be to change the setting
> automatically if the plot contains only images, but it is not
> considered very polite to change settings without user intervention.
I'm not talking about changing an existing plot, I'm talking about when
a plot is created automatically (through the datawizard or from the
command line with -y and/or -z, or when you make a new curve/image and
tell it to put it in a new plot), that the settings for the newly
created plot should reflect the starting contents of the plot.
SVN commit 485114 by arwalker: CCBUG:115969 Set AUTO instead of AUTOBORDER if we create a new plot for our new image. M +2 -0 kstimagedialog_i.cpp --- trunk/extragear/graphics/kst/kst/kstimagedialog_i.cpp #485113:485114 @@ -527,6 +527,8 @@ if (plot) { _w->_curvePlacement->update(); _w->_curvePlacement->setCurrentPlot(plot->tagName()); + plot->setXScaleMode(AUTO); + plot->setYScaleMode(AUTO); plot->addCurve(KstBaseCurvePtr(image)); plot->generateDefaultLabels(); } SVN commit 485140 by arwalker: BUG:115969 Set y-axis to AUTO when there are only images in the plot. Previously this was AUTOBORDER M +12 -2 main.cpp --- trunk/extragear/graphics/kst/kst/main.cpp #485139:485140 @@ -479,7 +479,9 @@ if (in.sep_plots) { i_plot++; - if (i_plot <in.n_plots) plot = *plist.at(i_plot); + if (i_plot < in.n_plots) { + plot = *plist.at(i_plot); + } } } @@ -683,7 +685,7 @@ } // next histogram } // end (if there are some histograms) - if (matrixList.count() >0) { // if there are some matrixes + if (matrixList.count() > 0) { // if there are some matrixes for (mat_i = matrixList.begin(); mat_i != matrixList.end(); ++mat_i) { QString tag_name = KST::suggestMatrixName(*mat_i); if (!file->isValidMatrix(*mat_i)) { @@ -736,6 +738,14 @@ for (i_plot = 0; i_plot < in.n_plots; i_plot++) { plot = *plist.at(i_plot); plot->generateDefaultLabels(); + + // if we have only images in a plot then set the scale mode to AUTO (instead of AUTOBORDER) + KstImageList images = kstObjectSubList<KstBaseCurve,KstImage>(plot->Curves); + if (images.count() == plot->Curves.count()) { + plot->setXScaleMode(AUTO); + plot->setYScaleMode(AUTO); + } + if (plot->Curves.count() > 3 || in.dolegend) { KstViewLegendPtr vl = plot->getOrCreateLegend(); vl->resizeFromAspect(0.1, 0.1, 0.2, 0.1); |