[graph] TScatter / TScatter2D stops drawing remaining points if a non-positive value is encountered in log scale
Los mantenedores suelen responder en 1 día
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Check duplicate issues
- Checked for duplicates
Description
When plotting a TScatter or TScatter2D on a pad with logarithmic scale enabled (gPad->SetLogx(), SetLogy(), or SetLogz()), encountering any non-positive coordinate (x <= 0, y <= 0, or z <= 0) causes the painter to prematurely terminate the entire rendering loop via else break; instead of skipping the invalid point via else continue;.
As a consequence, if an early point in the array happens to be non-positive, all subsequent valid positive points are omitted from the canvas.
Expected behavior:
Points with non-positive values should simply not be drawn on a log-scale axis, while all other valid positive points in the scatter plot should continue to be rendered.
Observed behavior:
All points appearing after the first non-positive point in the dataset are dropped and never painted.
Reproducer
Save the following self-contained macro as test_scatter_log.C:
void test_scatter_log() {
auto c = new TCanvas("c", "Scatter Log Test", 800, 600);
c->SetLogy();
// 5 points, where index 2 has non-positive y = 0
const int n = 5;
double x[n] = {1.0, 2.0, 3.0, 4.0, 5.0};
double y[n] = {10.0, 20.0, 0.0, 40.0, 50.0};
double col[n] = {1.0, 2.0, 3.0, 4.0, 5.0};
double size[n] = {2.0, 2.0, 2.0, 2.0, 2.0};
auto scatter = new TScatter(n, x, y, col, size);
scatter->SetMarkerStyle(20);
scatter->Draw("A");
c->Update();
// Only points 0 and 1 are drawn; points 3 and 4 are missing because of 'else break;'
}
Run with:
root -l test_scatter_log.C
ROOT version
ROOT 6.34/00 (or current master)
Installation method
Build from source
Operating system
macOS / Ubuntu Linux
Additional context
The issue is located in hist/histpainter/src/TGraphPainter.cxx:
- In
TGraphPainter::PaintScatter(lines ~4500 and ~4506) - In
TGraphPainter::PaintScatter2D(lines ~4734, ~4740, and ~4746)
In all these loops, replacing else break; with else continue; prevents aborting the marker loop when an unrenderable point is reached. This makes a great good first issue for new contributors.
- Lenguaje dominante
- C++
- Estrellas
- 3.3k
- Forks
- 1.6k
- Merge medio
- 2 d 7 h
- PR fusionados (30 d)
- 180
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de root-project/root
-
thisroot.sh: wrong ROOTSYS in zsh when the shell's command line has a newlinePosiblemente ocupada @dpiparo la tomó hace 7 días. Abiertobug in:Build System
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
root-project/root#23746 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[tmva][sofie] Inputs of unsupported type (e.g. float16) give code that does not compile instead of an errorPosiblemente ocupada @lmoneta la tomó hace 17 días. AbiertoAI-Assisted bug in:SOFIE
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
root-project/root#23655 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
TDataMember::GetOffset interfers to TDataMember::GetOffsetCintPosiblemente ocupada @pcanal la tomó hace 4 días. Abiertobug in:Core Libraries
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
root-project/root#23777 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
`TChain::GetEntries` internal caching ineffective?Posiblemente ocupada @pcanal la tomó hace 10 días. Abiertoimprovement in:TTree
root-project/root#23738 · 6 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[PyROOT] Segfault at exit deleting a branch with a Cling-generated collection destructor after cppyy instantiated a templatePosiblemente ocupada @guitargeek la tomó hace 10 días. Abiertobug in:Python Interface test wit cppjit
Dificultad 5/5 Más de una semana Aptitud para principiantes 12/100
root-project/root#23728 · 9 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de root-project/root
Issues similares
-
[Bug] [Go] Ack returns nil when the server answers with a non-OK statusPosiblemente ocupada @leizhiyuan la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
apache/rocketmq-clients#1465 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
cp-algorithms/cp-algorithms#1738 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
KhronosGroup/Vulkan-Tutorial#534 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 2 días
-
bug IO
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
MrNeRF/LichtFeld-Studio#3824 ·
Los mantenedores suelen responder en 1 día