bugGNU Octave - Bugs: bug #49469, changing axes fontsize does not...

 
 

bug #49469: changing axes fontsize does not change labels too

Submitted by:  L.Billmann <lbeducation>
Submitted on:  Fri 28 Oct 2016 12:44:06 PM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 3 - LowItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Open/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)

Fri 04 Nov 2016 05:57:05 PM UTC, comment #6:

I pushed the patch on default.

Closing report.

Pantxo Diribarne <pantxo>
Project Member
Thu 03 Nov 2016 01:21:34 PM UTC, comment #5:

I attached an updated patch that also lets one change the label/titlefontsizemultiplier and titlefontweight after the creation of labels and title.

(file #38877)

Pantxo Diribarne <pantxo>
Project Member
Thu 03 Nov 2016 12:42:56 PM UTC, comment #4:

I changed the category to "plotting" since both gnuplot and opengl based toolkits are affected

Pantxo Diribarne <pantxo>
Project Member
Thu 03 Nov 2016 12:40:38 PM UTC, comment #3:

I attached a patch.

(file #38875)

Pantxo Diribarne <pantxo>
Project Member
Mon 31 Oct 2016 08:43:55 PM UTC, comment #2:

Ok, I realize that it is not of that importence now. I think I will choose workaround #2 specific for OCTAVE doing redesign of several programs to handle both target systems.
For me topic is more of interest cause I prefer resizable GUIs, so resizing is a typical job for all my gui object.

L.Billmann <lbeducation>
Fri 28 Oct 2016 03:27:51 PM UTC, comment #1:

Yes, this is a known incompatibility. There are two easy workarounds which has meant no great pressure to fix this. I suspect that situation will continue for a while.

Workaround #1 :

Do all your plotting routines, change the axes fontsize, then do all the commands to annotate and make the plot beautiful such as adding labels and titles.

Workaround #2 :

Change all the label fontsizes at the same time you change the axes fontsize.

Workaround #3 :

Add a listener to the axes fontsize property which does what was done in Workaround #2.

function update_fontsize (h, ~)
hlist = get (h, {"xlabel", "ylabel", "zlabel", "title"});
new_fontsize = get (h, "fontsize");
set ([hlist{:}], "fontsize", new_fontsize);
endfunction
addlistener (gca, "fontsize", @update_fontsize)

This isn't quite perfect because it doesn't respect LabelFontSizeMultiplier and TitleFontSizeMultiplier, but you get the idea.

Rik <rik5>
Project Administrator
Fri 28 Oct 2016 12:44:06 PM UTC, original submission:

When fonsize of an axes is changed, then only the tic numbers change their size but not the labels, title or legend.
This differs from MATLAB.
(graphics_toolkit = qt, so I suppose working with OpenGL)

L.Billmann <lbeducation>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #38877:  updatelabels.patch added by pantxo (4KiB - text/x-diff)
file #38875:  labels.patch added by pantxo (3KiB - text/x-diff)
file #38833:  result_MATLAB.png added by lbeducation (16KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by pantxo (Updated the item)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by lbeducation (Submitted the item)
  • -unavailable- added by lbeducation
  •  

    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 14 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 04 Nov 2016 05:57:05 PM UTCpantxoStatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Thu 03 Nov 2016 01:21:34 PM UTCpantxoAttached File-=>Added updatelabels.patch, #38877
    Thu 03 Nov 2016 12:42:56 PM UTCpantxoCategoryPlotting with OpenGL=>Plotting
      StatusConfirmed=>Patch Submitted
      Operating SystemMicrosoft Windows=>Any
    Thu 03 Nov 2016 12:40:38 PM UTCpantxoAttached File-=>Added labels.patch, #38875
    Fri 28 Oct 2016 03:27:51 PM UTCrik5Priority5 - Normal=>3 - Low
      StatusNone=>Confirmed
      Release4.0.3=>dev
    Fri 28 Oct 2016 12:44:06 PM UTClbeducationAttached File-=>Added axes_fontsize_change.m, #38832
      Attached File-=>Added result_MATLAB.png, #38833
      Attached File-=>Added result_OCTAVE_qt.png, #38834
      Carbon-Copy-=>Added lbeducation

    Back to the top


    Powered by Savane 3.1-cleanup1