bugGNU Octave - Bugs: bug #34207, gl-render does not set tick labels...

 
 

bug #34207: gl-render does not set tick labels for log axes appropriately

Submitted by:  Michael Godfrey <godfrey>
Submitted on:  Mon 05 Sep 2011 03:06:18 AM UTC  
 
Category: Plotting with OpenGLSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Ben Abbott <bpabbott>
Originator Name: Michael GodfreyOpen/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sun 18 Sep 2011 04:48:14 PM UTC, comment #10:

There is already a report of missing TeX/LaTeX support below

https://savannah.gnu.org/bugs/index.php?32822

I'd like to see the number of bug reports pruned down to something more manageable. Since this is essentially a duplicate of 32822, I'm closing it.

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Sat 17 Sep 2011 12:51:39 AM UTC, comment #9:

The basic problem is that the OpenGL backend support does not support TeX/LaTeX markup.

I recommend closing this and starting a new report.

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Tue 06 Sep 2011 06:35:44 PM UTC, comment #8:

I've pushed a slightly modified changeset.

http://hg.savannah.gnu.org/hgweb/octave/rev/c7512d0d52e8

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Tue 06 Sep 2011 06:10:53 PM UTC, comment #7:

Actually, where I saw the code was in scripts/plot/
colorbar.m at line 557, so this is pretty irrelevant.

I think it is pretty obvious where to code goes
in graphics.cc, but it will need a bit of C++
cleverness...

Michael

Michael Godfrey <godfrey>
Project Member
Tue 06 Sep 2011 06:02:28 PM UTC, comment #6:

Ben,

This definitely helps. But, it does not
do the form 10^xx for the tick labels.
Particularly not for xx < 1.

I thought I saw code (which appeared not to be used)
in graphics.cc which setup the exponent form. I wll
look again. In any case, code of that form is needed.
This also means that the minimum range can be less than
10.

Good start at least, and this patch could, I think,
be pushed as is.

Michael

Michael Godfrey <godfrey>
Project Member
Tue 06 Sep 2011 03:29:27 PM UTC, comment #5:

This fixes most of the problem for me.

However, for plots like loglog([1 1.1]) the result would look better if the axis limits were tighter (meaning I think the tick_sep is correct, but the axis limits are too loose).

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Tue 06 Sep 2011 01:12:46 AM UTC, comment #4:

Here looks like a place to start:

Line: 5236 in graphics.cc:
void
axes::properties::calc_ticks_and_lims (array_property& lims,
array_property& ticks,
array_property& mticks,
bool limmode_is_auto, bool is_logscale)
{
// FIXME -- add log ticks and lims

Michael Godfrey <godfrey>
Project Member
Tue 06 Sep 2011 01:07:49 AM UTC, comment #3:

The code in graphics.cc appears to be intended
to generate correct log tick labels, but it seems
not to be working.

I will make a try at understanding where it goes
wrong, but attention from someone who understands
the code would likely get this fixed sooner.

Michael

Michael Godfrey <godfrey>
Project Member
Tue 06 Sep 2011 12:58:13 AM UTC, comment #2:

Ben,

My quick reading of the gnuplot path code suggested that
if gnuplot is told that the axis is log-scale, it does the
"right" thing with tick-labels. The code also tells gnuplot
to reduce the
number of minor ticks for log axis and this seems to work.

Michael

Michael Godfrey <godfrey>
Project Member
Tue 06 Sep 2011 12:45:23 AM UTC, comment #1:

The tick mark/label positions aren't calculated for gnuplot either. I haven't checked, but it appears that either gnuplot or the gnuplot backend fixes this.

In graphics.cc the is a FIXME which mentions log ticks.

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Mon 05 Sep 2011 03:06:18 AM UTC, original submission:

When using log axes with fltk the tick labels are
displayed as for linear axes. Thus, for semilogy(1:10)
the x axis tick labels are:

1.58489 2.51189 3.98107 6.30957 10

instead of
10^0.2 10^0.4 10^0.6 10^0.8 10^1.0

or, for ML compatibility:

10^0 10^1

Also, ML shows tick marks as follows for semilogx(1:2):

10^0 10^0.1 10^0.2 10^0.3

and, in the ML plot the ^xx is actually a superscript.
Not sure if OpenGL knows how to do this. Not too important
compared to using 10^xx for the log tick labels and reducing
the number of minor ticks.

I looked at the code in gl-render.cc, which seems to be
where this fix should go, but it was not obvious what the
correct code should be.

So, can someone with OpenGL knowledge look at this?
Michael

Michael Godfrey <godfrey>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bpabbott (Updated the item)
  • -unavailable- added by godfrey (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 18 Sep 2011 04:48:14 PM UTCbpabbottStatusConfirmed=>Fixed
      Assigned toNone=>bpabbott
      Open/ClosedOpen=>Closed
    Tue 06 Sep 2011 12:14:11 AM UTCbpabbottStatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1