[ROOT-7766] SetTimeDisplay is set to false when SetLogy is enabled Created: 03/Nov/15  Updated: 04/Nov/15  Resolved: 04/Nov/15

Status: Closed
Project: ROOT
Component/s: Graphics
Affects Version/s: 6.04/06
Fix Version/s: 6.06/00, 5.34/36

Type: Bug Priority: Medium
Reporter: Olivier Delaune Assignee: Olivier Couet
Resolution: Fixed Votes: 0
Labels: None

CentOs 6 64-bits

Actual End:


Run this following macro

#include <TGraph.h>
#include <TAxis.h>
using namespace std;
void test() {
  float x[4] = {1,2,3,4};
  float y[4] = {2,4,6e36,8};
  TGraph *g = new TGraph(4,x,y);

A graph appears with an X-axis shown as a time. Click right and select "setlogy"
See that the x-axis is not shown as a time.

Comment by Olivier Delaune [ 04/Nov/15 ]

Note that this bug also affects ROOT 5.34/34

Comment by Olivier Couet [ 04/Nov/15 ]

It looks like the way it is implemented produces this effect. When you set the log scale the axis are recreated, with the defaults attribute. The default is SetTimeDisplay(false); that's why the time display goes away. I you set the log before the time display then it works. Now I have to see why/where the axis are recreated and check if the time attribute can be kept... need some time.

Comment by Olivier Couet [ 04/Nov/15 ]

Thanks for reporting.

Generated at Mon Feb 17 07:24:12 CET 2020 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.