Home > Java > javaTutorial > How to Rescale the Domain Axis in a CombinedDomainXYPlot After Hiding Series?

How to Rescale the Domain Axis in a CombinedDomainXYPlot After Hiding Series?

DDD
Release: 2024-12-08 14:55:10
Original
625 people have browsed it

How to Rescale the Domain Axis in a CombinedDomainXYPlot After Hiding Series?

Rescaling the Domain Axis in a CombinedDomainXYPlot

The CombinedDomainXYPlot allows for multiple subplots to share a common domain axis. However, when hiding a series, only the range axes automatically rescale while the domain axis remains unchanged. This article explores ways to manually refresh the scaling or enable automatic scaling of the domain axis.

Data Range Establishment

CombinedDomainXYPlot establishes the combined maximum range for its shared domain axis in its getDataRange() method. This is crucial for axis sharing among subplots. Changing series visibility has no impact on the domain axis, while modifying the dataset updates it through its configure() method.

Manual Refresh or Automatic Update

To manually refresh the domain axis after hiding a series:

mainPlot.getDomainAxis().configure();
Copy after login

To enable automatic updates of the domain axis, use addSeries() or removeSeries() instead of setSeriesVisible().

Additional Considerations

  • Avoid neglecting initial threads and pack().
  • Toggle setAutoRange() is not recommended as it has no effect.

The above is the detailed content of How to Rescale the Domain Axis in a CombinedDomainXYPlot After Hiding Series?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template