[Gmsh] Change position of value scale

Christophe Geuzaine cgeuzaine at uliege.be
Thu Dec 5 11:44:52 CET 2019



> On 5 Dec 2019, at 10:25, Marco Tiberga <M.Tiberga at tudelft.nl> wrote:
> 
> Dear Max,
>  
> Yes, that works!
> The scale is vertical now, even though I cannot move it to the right/left of the view.

Here's how to have a vertical scale 100 pixels from the right edge of the window, centered vertically:

test.geo:

***
View "Test" {
  ST(0,0,0, 1,0,0, 0,1,0){1,2,3};
};

PostProcessing.HorizontalScales = 0; // Display value scales horizontally
View[0].AutoPosition = 0; // Position the scale or 2D plot automatically (0: manual)
View[0].Height = 200; // Height (in pixels) of the scale or 2D plot
View[0].Width = 20; // Width (in pixels) of the scale or 2D plot
View[0].PositionX = -100; // X position (in pixels) of the scale or 2D plot (< 0: measure from right edge; >= 1e5: centered)
View[0].PositionY = 1e6; // Y position (in pixels) of the scale or 2D plot (< 0: measure from bottom edge; >= 1e5: centered)
***

(There is a little bug with vertical alignment in the latest stable release, that was just fixed. Use the latest snapshot to test.)

Christophe



> . but it does not matter, better than nothing.
>  
> Thanks for the help, I scanned through the View options in the manual, I did not think of looking at the PostProcessing ones as well.
> As a suggestion, I think that explaining what the “PostProcessing.HorizontalScales = 0” does in the manual is useful to everyone.
>  
> Best,
> Marco
>  
>  
> From: Max Orok [mailto:morok at mevex.com] 
> Sent: woensdag 4 december 2019 20:21
> To: Marco Tiberga
> Cc: gmsh at onelab.info
> Subject: Re: [Gmsh] Change position of value scale
>  
> Maybe try setting PostProcessing.HorizontalScales = 0; ?
>  
> <image001.png>
>  
> http://gmsh.info/doc/texinfo/gmsh.html#Post_002dprocessing-options-list
>  
> Sincerely,
> Max 
>  
> On Wed, Dec 4, 2019 at 1:52 PM Marco Tiberga <M.Tiberga at tudelft.nl> wrote:
> Dear Gmsh community,
>  
> Is there a way to change the position of the value scale in any kind of View?
> I tried with the most recent Gmsh snapshot, but if I go to “View options” -> “Axes” -> “2D axes/value scale position” only the option “manual” seems to actually be able to change the position. I am using the GUI, FYI.
>  
> However, I cannot obtain what I want.
> The “Automatic” position is at the bottom-center of the screen and the scale is horizontal. If possible, I would like to have a vertical scale, to the left or right of the view.
>  
> Thanks a lot for your help, in advance.
>  
> Best regards,
> Marco Tiberga
> PhD candidate
> Delft University of Technology
> Faculty of Applied Sciences
> Radiation Science & Technology Department
> Mekelweg 15, 2629 JB Delft, The Netherlands
> E-Mail: m.tiberga at tudelft.nl
> Website: http://www.nera.rst.tudelft.nl/
>  
>  
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh
> 
> 
> -- 
> Max Orok
> Contractor
> www.mevex.com
> 
> <image002.jpg>
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine






More information about the gmsh mailing list