Skip to content

Commit 319fc7c

Browse files
authored
various typo fixes (#642)
1 parent 3da8bd3 commit 319fc7c

File tree

5 files changed

+26
-26
lines changed

5 files changed

+26
-26
lines changed

implot.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ You can read releases logs https://github.com/epezent/implot/releases for more d
9696
- 2020/09/07 (0.8) - Plotting functions which accept a custom getter function pointer have been post-fixed with a G (e.g. PlotLineG)
9797
- 2020/09/06 (0.7) - Several flags under ImPlotFlags and ImPlotAxisFlags were inverted (e.g. ImPlotFlags_Legend -> ImPlotFlags_NoLegend) so that the default flagset
9898
is simply 0. This more closely matches ImGui's style and makes it easier to enable non-default but commonly used flags (e.g. ImPlotAxisFlags_Time).
99-
- 2020/08/28 (0.5) - ImPlotMarker_ can no longer be combined with bitwise OR, |. This features caused unecessary slow-down, and almost no one used it.
99+
- 2020/08/28 (0.5) - ImPlotMarker_ can no longer be combined with bitwise OR, |. This features caused unnecessary slow-down, and almost no one used it.
100100
- 2020/08/25 (0.5) - ImPlotAxisFlags_Scientific was removed. Logarithmic axes automatically uses scientific notation.
101101
- 2020/08/17 (0.5) - PlotText was changed so that text is centered horizontally and vertically about the desired point.
102102
- 2020/08/16 (0.5) - An ImPlotContext must be explicitly created and destroyed now with `CreateContext` and `DestroyContext`. Previously, the context was statically initialized in this source file.
@@ -315,7 +315,7 @@ static const ImPlotStyleVarInfo GPlotStyleVarInfo[] =
315315
{ ImGuiDataType_Float, 2, (ImU32)offsetof(ImPlotStyle, MajorGridSize) }, // ImPlotStyleVar_MajorGridSize
316316
{ ImGuiDataType_Float, 2, (ImU32)offsetof(ImPlotStyle, MinorGridSize) }, // ImPlotStyleVar_MinorGridSize
317317
{ ImGuiDataType_Float, 2, (ImU32)offsetof(ImPlotStyle, PlotPadding) }, // ImPlotStyleVar_PlotPadding
318-
{ ImGuiDataType_Float, 2, (ImU32)offsetof(ImPlotStyle, LabelPadding) }, // ImPlotStyleVar_LabelPaddine
318+
{ ImGuiDataType_Float, 2, (ImU32)offsetof(ImPlotStyle, LabelPadding) }, // ImPlotStyleVar_LabelPadding
319319
{ ImGuiDataType_Float, 2, (ImU32)offsetof(ImPlotStyle, LegendPadding) }, // ImPlotStyleVar_LegendPadding
320320
{ ImGuiDataType_Float, 2, (ImU32)offsetof(ImPlotStyle, LegendInnerPadding) }, // ImPlotStyleVar_LegendInnerPadding
321321
{ ImGuiDataType_Float, 2, (ImU32)offsetof(ImPlotStyle, LegendSpacing) }, // ImPlotStyleVar_LegendSpacing
@@ -3632,7 +3632,7 @@ void EndSubplots() {
36323632
// remove items
36333633
if (gp.CurrentItems == &subplot.Items)
36343634
gp.CurrentItems = nullptr;
3635-
// reset the plot items for the next frame (TODO: put this elswhere)
3635+
// reset the plot items for the next frame (TODO: put this elsewhere)
36363636
for (int i = 0; i < subplot.Items.GetItemCount(); ++i) {
36373637
subplot.Items.GetItemByIndex(i)->SeenThisFrame = false;
36383638
}
@@ -5217,7 +5217,7 @@ void ShowAxisMetrics(const ImPlotPlot& plot, const ImPlotAxis& axis) {
52175217
ImGui::BulletText("Range: [%f,%f]",axis.Range.Min, axis.Range.Max);
52185218
ImGui::BulletText("Pixels: %f", axis.PixelSize());
52195219
ImGui::BulletText("Aspect: %f", axis.GetAspect());
5220-
ImGui::BulletText(axis.OrthoAxis == nullptr ? "OrtherAxis: NULL" : "OrthoAxis: 0x%08X", axis.OrthoAxis->ID);
5220+
ImGui::BulletText(axis.OrthoAxis == nullptr ? "OrthoAxis: NULL" : "OrthoAxis: 0x%08X", axis.OrthoAxis->ID);
52215221
ImGui::BulletText("LinkedMin: %p", (void*)axis.LinkedMin);
52225222
ImGui::BulletText("LinkedMax: %p", (void*)axis.LinkedMax);
52235223
ImGui::BulletText("HasRange: %s", axis.HasRange ? "true" : "false");

implot.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
// Define attributes of all API symbols declarations (e.g. for DLL under Windows)
5656
// Using ImPlot via a shared library is not recommended, because we don't guarantee
5757
// backward nor forward ABI compatibility and also function call overhead. If you
58-
// do use ImPlot as a DLL, be sure to call SetImGuiContext (see Miscellanous section).
58+
// do use ImPlot as a DLL, be sure to call SetImGuiContext (see Miscellaneous section).
5959
#ifndef IMPLOT_API
6060
#define IMPLOT_API
6161
#endif
@@ -123,14 +123,14 @@ enum ImAxis_ {
123123
ImAxis_Y1, // enabled by default
124124
ImAxis_Y2, // disabled by default
125125
ImAxis_Y3, // disabled by default
126-
// bookeeping
126+
// bookkeeping
127127
ImAxis_COUNT
128128
};
129129

130130
// Options for plots (see BeginPlot).
131131
enum ImPlotFlags_ {
132132
ImPlotFlags_None = 0, // default
133-
ImPlotFlags_NoTitle = 1 << 0, // the plot title will not be displayed (titles are also hidden if preceeded by double hashes, e.g. "##MyPlot")
133+
ImPlotFlags_NoTitle = 1 << 0, // the plot title will not be displayed (titles are also hidden if preceded by double hashes, e.g. "##MyPlot")
134134
ImPlotFlags_NoLegend = 1 << 1, // the legend will not be displayed
135135
ImPlotFlags_NoMouseText = 1 << 2, // the mouse position, in plot coordinates, will not be displayed inside of the plot
136136
ImPlotFlags_NoInputs = 1 << 3, // the user will not be able to interact with the plot
@@ -169,7 +169,7 @@ enum ImPlotAxisFlags_ {
169169
// Options for subplots (see BeginSubplot)
170170
enum ImPlotSubplotFlags_ {
171171
ImPlotSubplotFlags_None = 0, // default
172-
ImPlotSubplotFlags_NoTitle = 1 << 0, // the subplot title will not be displayed (titles are also hidden if preceeded by double hashes, e.g. "##MySubplot")
172+
ImPlotSubplotFlags_NoTitle = 1 << 0, // the subplot title will not be displayed (titles are also hidden if preceded by double hashes, e.g. "##MySubplot")
173173
ImPlotSubplotFlags_NoLegend = 1 << 1, // the legend will not be displayed (only applicable if ImPlotSubplotFlags_ShareItems is enabled)
174174
ImPlotSubplotFlags_NoMenus = 1 << 2, // the user will not be able to open context menus with right-click
175175
ImPlotSubplotFlags_NoResize = 1 << 3, // resize splitters between subplot cells will be not be provided
@@ -305,7 +305,7 @@ enum ImPlotHistogramFlags_ {
305305
ImPlotHistogramFlags_Horizontal = 1 << 10, // histogram bars will be rendered horizontally (not supported by PlotHistogram2D)
306306
ImPlotHistogramFlags_Cumulative = 1 << 11, // each bin will contain its count plus the counts of all previous bins (not supported by PlotHistogram2D)
307307
ImPlotHistogramFlags_Density = 1 << 12, // counts will be normalized, i.e. the PDF will be visualized, or the CDF will be visualized if Cumulative is also set
308-
ImPlotHistogramFlags_NoOutliers = 1 << 13, // exclude values outside the specifed histogram range from the count toward normalizing and cumulative counts
308+
ImPlotHistogramFlags_NoOutliers = 1 << 13, // exclude values outside the specified histogram range from the count toward normalizing and cumulative counts
309309
ImPlotHistogramFlags_ColMajor = 1 << 14 // data will be read in column major order (not supported by PlotHistogram)
310310
};
311311

@@ -355,7 +355,7 @@ enum ImPlotCol_ {
355355
ImPlotCol_LegendText, // legend text color (defaults to ImPlotCol_InlayText)
356356
ImPlotCol_TitleText, // plot title text color (defaults to ImGuiCol_Text)
357357
ImPlotCol_InlayText, // color of text appearing inside of plots (defaults to ImGuiCol_Text)
358-
ImPlotCol_AxisText, // axis label and tick lables color (defaults to ImGuiCol_Text)
358+
ImPlotCol_AxisText, // axis label and tick labels color (defaults to ImGuiCol_Text)
359359
ImPlotCol_AxisGrid, // axis grid color (defaults to 25% ImPlotCol_AxisText)
360360
ImPlotCol_AxisTick, // axis tick color (defaults to AxisGrid)
361361
ImPlotCol_AxisBg, // background color of axis hover region (defaults to transparent)
@@ -404,7 +404,7 @@ enum ImPlotStyleVar_ {
404404
enum ImPlotScale_ {
405405
ImPlotScale_Linear = 0, // default linear scale
406406
ImPlotScale_Time, // date/time scale
407-
ImPlotScale_Log10, // base 10 logartithmic scale
407+
ImPlotScale_Log10, // base 10 logarithmic scale
408408
ImPlotScale_SymLog, // symmetric log scale
409409
};
410410

@@ -645,7 +645,7 @@ IMPLOT_API void EndPlot();
645645

646646
// Starts a subdivided plotting context. If the function returns true,
647647
// EndSubplots() MUST be called! Call BeginPlot/EndPlot AT MOST [rows*cols]
648-
// times in between the begining and end of the subplot context. Plots are
648+
// times in between the beginning and end of the subplot context. Plots are
649649
// added in row major order.
650650
//
651651
// Example:
@@ -746,7 +746,7 @@ IMPLOT_API void SetupAxisTicks(ImAxis axis, const double* values, int n_ticks, c
746746
IMPLOT_API void SetupAxisTicks(ImAxis axis, double v_min, double v_max, int n_ticks, const char* const labels[]=nullptr, bool keep_default=false);
747747
// Sets an axis' scale using built-in options.
748748
IMPLOT_API void SetupAxisScale(ImAxis axis, ImPlotScale scale);
749-
// Sets an axis' scale using user supplied forward and inverse transfroms.
749+
// Sets an axis' scale using user supplied forward and inverse transforms.
750750
IMPLOT_API void SetupAxisScale(ImAxis axis, ImPlotTransform forward, ImPlotTransform inverse, void* data=nullptr);
751751
// Sets an axis' limits constraints.
752752
IMPLOT_API void SetupAxisLimitsConstraints(ImAxis axis, double v_min, double v_max);
@@ -776,7 +776,7 @@ IMPLOT_API void SetupFinish();
776776
// using a preceding button or slider widget to change the plot limits). In
777777
// this case, you can use the `SetNext` API below. While this is not as feature
778778
// rich as the Setup API, most common needs are provided. These functions can be
779-
// called anwhere except for inside of `Begin/EndPlot`. For example:
779+
// called anywhere except for inside of `Begin/EndPlot`. For example:
780780

781781
// if (ImGui::Button("Center Plot"))
782782
// ImPlot::SetNextPlotLimits(-1,1,-1,1);
@@ -806,7 +806,7 @@ IMPLOT_API void SetNextAxesToFit();
806806
// [SECTION] Plot Items
807807
//-----------------------------------------------------------------------------
808808

809-
// The main plotting API is provied below. Call these functions between
809+
// The main plotting API is provided below. Call these functions between
810810
// Begin/EndPlot and after any Setup API calls. Each plots data on the current
811811
// x and y axes, which can be changed with `SetAxis/Axes`.
812812
//
@@ -978,7 +978,7 @@ IMPLOT_API ImVec2 PlotToPixels(double x, double y, ImAxis x_axis = IMPLOT_AUTO,
978978

979979
// Get the current Plot position (top-left) in pixels.
980980
IMPLOT_API ImVec2 GetPlotPos();
981-
// Get the curent Plot size in pixels.
981+
// Get the current Plot size in pixels.
982982
IMPLOT_API ImVec2 GetPlotSize();
983983

984984
// Returns the mouse position in x,y coordinates of the current plot. Passing IMPLOT_AUTO uses the current axes.
@@ -1084,7 +1084,7 @@ IMPLOT_API void EndDragDropSource();
10841084
// manually set these colors to whatever you like, and further can Push/Pop
10851085
// them around individual plots for plot-specific styling (e.g. coloring axes).
10861086

1087-
// Provides access to plot style structure for permanant modifications to colors, sizes, etc.
1087+
// Provides access to plot style structure for permanent modifications to colors, sizes, etc.
10881088
IMPLOT_API ImPlotStyle& GetStyle();
10891089

10901090
// Style plot colors for current ImGui style (default).
@@ -1191,11 +1191,11 @@ IMPLOT_API ImVec4 SampleColormap(float t, ImPlotColormap cmap = IMPLOT_AUTO);
11911191
IMPLOT_API void ColormapScale(const char* label, double scale_min, double scale_max, const ImVec2& size = ImVec2(0,0), const char* format = "%g", ImPlotColormapScaleFlags flags = 0, ImPlotColormap cmap = IMPLOT_AUTO);
11921192
// Shows a horizontal slider with a colormap gradient background. Optionally returns the color sampled at t in [0 1].
11931193
IMPLOT_API bool ColormapSlider(const char* label, float* t, ImVec4* out = nullptr, const char* format = "", ImPlotColormap cmap = IMPLOT_AUTO);
1194-
// Shows a button with a colormap gradient brackground.
1194+
// Shows a button with a colormap gradient background.
11951195
IMPLOT_API bool ColormapButton(const char* label, const ImVec2& size = ImVec2(0,0), ImPlotColormap cmap = IMPLOT_AUTO);
11961196

11971197
// When items in a plot sample their color from a colormap, the color is cached and does not change
1198-
// unless explicitly overriden. Therefore, if you change the colormap after the item has already been plotted,
1198+
// unless explicitly overridden. Therefore, if you change the colormap after the item has already been plotted,
11991199
// item colors will NOT update. If you need item colors to resample the new colormap, then use this
12001200
// function to bust the cached colors. If #plot_title_id is nullptr, then every item in EVERY existing plot
12011201
// will be cache busted. Otherwise only the plot specified by #plot_title_id will be busted. For the
@@ -1207,7 +1207,7 @@ IMPLOT_API void BustColorCache(const char* plot_title_id = nullptr);
12071207
// [SECTION] Input Mapping
12081208
//-----------------------------------------------------------------------------
12091209

1210-
// Provides access to input mapping structure for permanant modifications to controls for pan, select, etc.
1210+
// Provides access to input mapping structure for permanent modifications to controls for pan, select, etc.
12111211
IMPLOT_API ImPlotInputMap& GetInputMap();
12121212

12131213
// Default input mapping: pan = LMB drag, box select = RMB drag, fit = LMB double click, context menu = RMB click, zoom = scroll.

implot_demo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1959,7 +1959,7 @@ void Demo_CustomDataAndGetters() {
19591959
ImPlot::PopStyleVar();
19601960

19611961
// you can also pass C++ lambdas:
1962-
// auto lamda = [](void* data, int idx) { ... return ImPlotPoint(x,y); };
1962+
// auto lambda = [](void* data, int idx) { ... return ImPlotPoint(x,y); };
19631963
// ImPlot::PlotLine("My Lambda", lambda, data, 1000);
19641964

19651965
ImPlot::EndPlot();
@@ -2399,11 +2399,11 @@ void StyleSeaborn() {
23992399
style.PlotMinSize = ImVec2(300,225);
24002400
}
24012401

2402-
} // namespaece MyImPlot
2402+
} // namespace MyImPlot
24032403

24042404
// WARNING:
24052405
//
2406-
// You can use "implot_internal.h" to build custom plotting fuctions or extend ImPlot.
2406+
// You can use "implot_internal.h" to build custom plotting functions or extend ImPlot.
24072407
// However, note that forward compatibility of this file is not guaranteed and the
24082408
// internal API is subject to change. At some point we hope to bring more of this
24092409
// into the public API and expose the necessary building blocks to fully support

implot_internal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
// Constants can be changed unless stated otherwise. We may move some of these
5252
// to ImPlotStyleVar_ over time.
5353

54-
// Mimimum allowable timestamp value 01/01/1970 @ 12:00am (UTC) (DO NOT DECREASE THIS)
54+
// Minimum allowable timestamp value 01/01/1970 @ 12:00am (UTC) (DO NOT DECREASE THIS)
5555
#define IMPLOT_MIN_TIME 0
5656
// Maximum allowable timestamp value 01/01/3000 @ 12:00am (UTC) (DO NOT INCREASE THIS)
5757
#define IMPLOT_MAX_TIME 32503680000
@@ -198,7 +198,7 @@ static inline ImU32 ImMixU32(ImU32 a, ImU32 b, ImU32 s) {
198198
#endif
199199
}
200200

201-
// Lerp across an array of 32-bit collors given t in [0.0 1.0]
201+
// Lerp across an array of 32-bit colors given t in [0.0 1.0]
202202
static inline ImU32 ImLerpU32(const ImU32* colors, int size, float t) {
203203
int i1 = (int)((size - 1 ) * t);
204204
int i2 = i1 + 1;

implot_items.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ static IMPLOT_INLINE float ImInvSqrt(float x) { return 1.0f / sqrtf(x); }
9797
#define IMPLOT_NUMERIC_TYPES (ImS8)(ImU8)(ImS16)(ImU16)(ImS32)(ImU32)(ImS64)(ImU64)(float)(double)
9898
#endif
9999

100-
// CALL_INSTANTIATE_FOR_NUMERIC_TYPES will duplicate the template instantion code `INSTANTIATE_MACRO(T)` on supported types.
100+
// CALL_INSTANTIATE_FOR_NUMERIC_TYPES will duplicate the template instantiation code `INSTANTIATE_MACRO(T)` on supported types.
101101
#define _CAT(x, y) _CAT_(x, y)
102102
#define _CAT_(x,y) x ## y
103103
#define _INSTANTIATE_FOR_NUMERIC_TYPES(chain) _CAT(_INSTANTIATE_FOR_NUMERIC_TYPES_1 chain, _END)

0 commit comments

Comments
 (0)