15 namespace illumina {
namespace interop {
namespace logic {
namespace plot
24 template<
typename Po
int>
29 float ymin = std::numeric_limits<float>::max();
30 float xmin = std::numeric_limits<float>::max();
31 float ymax = -std::numeric_limits<float>::max();
32 float xmax = -std::numeric_limits<float>::max();
33 for (const_series_iterator cur_series = data.
begin(), series_end = data.
end();
34 cur_series != series_end; ++cur_series)
36 for (const_point_iterator cur_pt = cur_series->begin(), end_pt = cur_series->end();
37 cur_pt != end_pt; ++cur_pt)
39 ymax = std::max(ymax, cur_pt->max_value());
40 xmax = std::max(xmax, cur_pt->x());
41 if (zero_min)
continue;
42 ymin = std::min(ymin, cur_pt->min_value());
43 xmin = std::min(xmin, cur_pt->x());
46 if (ymin == std::numeric_limits<float>::max()) ymin = 0;
47 if (xmin == std::numeric_limits<float>::max()) xmin = 0;
48 ymax = (ymax == -std::numeric_limits<float>::max()) ? 0 : scale_y_max * ymax + 0.0001f;
49 if (xmax == -std::numeric_limits<float>::max()) xmax = 0;
58 template<
typename Po
int>
63 float xmin = std::numeric_limits<float>::max();
64 float xmax = -std::numeric_limits<float>::max();
65 for (const_series_iterator cur_series = data.
begin(), series_end = data.
end();
66 cur_series != series_end; ++cur_series)
68 for (const_point_iterator cur_pt = cur_series->begin(), end_pt = cur_series->end();
69 cur_pt != end_pt; ++cur_pt)
71 xmax = std::max(xmax, cur_pt->x());
72 if (zero_min)
continue;
73 xmin = std::min(xmin, cur_pt->x());
76 if (xmin == std::numeric_limits<float>::max()) xmin = 0;
77 if (xmax == -std::numeric_limits<float>::max()) xmax = 0;
87 template<
typename Po
int>
92 float ymin = std::numeric_limits<float>::max();
93 float ymax = -std::numeric_limits<float>::max();
94 for (const_series_iterator cur_series = data.
begin(), series_end = data.
end();
95 cur_series != series_end; ++cur_series)
97 for (const_point_iterator cur_pt = cur_series->begin(), end_pt = cur_series->end();
98 cur_pt != end_pt; ++cur_pt)
100 ymax = std::max(ymax, cur_pt->max_value());
101 if (zero_min)
continue;
102 ymin = std::min(ymin, cur_pt->min_value());
105 if (ymin == std::numeric_limits<float>::max()) ymin = 0;
106 ymax = (ymax == -std::numeric_limits<float>::max()) ? 0 : scale_y_max * ymax + 0.0001f;
119 const char* more_colors[] =
183 if(index < color_offset)
192 return more_colors[index-color_offset];
series_collection_t::const_iterator const_iterator
Definition: plot_data.h:42
Definition: enum_description.h:15
const_iterator end() const
Definition: plot_data.h:147
void auto_scale(model::plot::plot_data< Point > &data, const bool zero_min=true, const float scale_y_max=1.1f)
Definition: plot_data.h:25
const_iterator begin() const
Definition: plot_data.h:139
std::string color_name_for_index(const size_t index)
Definition: plot_data.h:117
void set_xrange(const float vmin, const float vmax)
Definition: chart_data.h:85
void auto_scale_x(model::plot::plot_data< Point > &data, const bool zero_min=true)
Definition: plot_data.h:59
#define INTEROP_ASSERT(TST)
Definition: assert.h:21
Definition: plot_data.h:28
void set_range(const float xmin, const float xmax, const float ymin, const float ymax)
Definition: chart_data.h:74
void auto_scale_y(model::plot::plot_data< Point > &data, const bool zero_min=true, const float scale_y_max=1.1f)
Definition: plot_data.h:88
void set_yrange(const float vmin, const float vmax)
Definition: chart_data.h:95
size_t length_of(const T &val)
Definition: length_of.h:55
std::string to_string(Enum value)
Definition: enums.h:43
point_collection_t::const_iterator const_iterator
Definition: series.h:25