MCPcopy Create free account
hub / github.com/Kitware/VTK / UpdateChartSettings

Method UpdateChartSettings

Charts/Core/vtkScatterPlotMatrix.cxx:1800–1848  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1798
1799//------------------------------------------------------------------------------
1800void vtkScatterPlotMatrix::UpdateChartSettings(int plotType)
1801{
1802 if (plotType == HISTOGRAM)
1803 {
1804 int plotCount = this->GetSize().GetX();
1805
1806 for (int i = 0; i < plotCount; i++)
1807 {
1808 vtkChart* chart = this->GetChart(vtkVector2i(i, plotCount - i - 1));
1809 this->Private->UpdateAxis(
1810 chart->GetAxis(vtkAxis::TOP), this->Private->ChartSettings[HISTOGRAM]);
1811 this->Private->UpdateAxis(
1812 chart->GetAxis(vtkAxis::RIGHT), this->Private->ChartSettings[HISTOGRAM]);
1813 this->Private->UpdateChart(chart, this->Private->ChartSettings[HISTOGRAM]);
1814 }
1815 }
1816 else if (plotType == SCATTERPLOT)
1817 {
1818 int plotCount = this->GetSize().GetX();
1819
1820 for (int i = 0; i < plotCount - 1; i++)
1821 {
1822 for (int j = 0; j < plotCount - 1; j++)
1823 {
1824 if (this->GetPlotType(i, j) == SCATTERPLOT)
1825 {
1826 vtkChart* chart = this->GetChart(vtkVector2i(i, j));
1827 bool updateleft = i == 0;
1828 bool updatebottom = j == 0;
1829 this->Private->UpdateAxis(
1830 chart->GetAxis(vtkAxis::LEFT), this->Private->ChartSettings[SCATTERPLOT], updateleft);
1831 this->Private->UpdateAxis(chart->GetAxis(vtkAxis::BOTTOM),
1832 this->Private->ChartSettings[SCATTERPLOT], updatebottom);
1833 }
1834 }
1835 }
1836 }
1837 else if (plotType == ACTIVEPLOT && this->Private->BigChart)
1838 {
1839 this->Private->UpdateAxis(
1840 this->Private->BigChart->GetAxis(vtkAxis::TOP), this->Private->ChartSettings[ACTIVEPLOT]);
1841 this->Private->UpdateAxis(
1842 this->Private->BigChart->GetAxis(vtkAxis::RIGHT), this->Private->ChartSettings[ACTIVEPLOT]);
1843 this->Private->UpdateChart(this->Private->BigChart, this->Private->ChartSettings[ACTIVEPLOT]);
1844 this->Private->BigChart->SetSelectionMode(this->SelectionMode);
1845 this->ActivePlotValid = false;
1846 }
1847 this->Modified();
1848}
1849//------------------------------------------------------------------------------
1850void vtkScatterPlotMatrix::SetSelectionMode(int selMode)
1851{

Callers 1

UpdateSettingsMethod · 0.95

Calls 8

GetPlotTypeMethod · 0.95
SetSelectionModeMethod · 0.80
vtkVector2iClass · 0.50
GetXMethod · 0.45
GetSizeMethod · 0.45
GetChartMethod · 0.45
GetAxisMethod · 0.45
ModifiedMethod · 0.45

Tested by

no test coverage detected