FuncSketch
Loading...
Searching...
No Matches
axis_ticks.h
Go to the documentation of this file.
1/*
2 * Copyright 2026 MusicScience37 (Kenta Kabashima)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
20#pragma once
21
22#include <cstddef>
23#include <string>
24#include <utility>
25#include <vector>
26
28
29namespace func_sketch::plotter {
30
34struct AxisTicks {
36 std::vector<Real> values;
37
39 std::vector<std::string> strings;
40};
41
50void generate_axis_ticks(const std::pair<Real, Real>& range,
51 std::size_t approx_num_ticks, AxisTicks& ticks);
52
53} // namespace func_sketch::plotter
void generate_axis_ticks(const std::pair< Real, Real > &range, std::size_t approx_num_ticks, AxisTicks &ticks)
Generate ticks of axes.
Definitions of common types.
Struct to represent ticks of axes.
Definition axis_ticks.h:34
std::vector< std::string > strings
Tick strings.
Definition axis_ticks.h:39
std::vector< Real > values
Tick values in real numbers.
Definition axis_ticks.h:36