BUG: If I manually set xticks on figure, minor x-ticks and grid miss out where major ticks 'would; have been

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

BUG: If I manually set xticks on figure, minor x-ticks and grid miss out where major ticks 'would; have been

Tim Pierce
Octave 4.0.0


If I manually set major grid lines via xtick (e.g.to 7 for a graph of days in a month )

Code:

    figure 1
    plot( 1:30)
    set( gca, 'xtick', 0:7:30 )
    set( gca, 'xminortick', 'on' )
     grid on

Visibly it will miss out where the major x-ticks originally would have expected to have been.

In my picture  5,10,15,20,25...

Inline images 1

It gets pretty glaring if you try to use minor x gridlines - as I wanted to for a presentation

Inline images 2

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: BUG: If I manually set xticks on figure, minor x-ticks and grid miss out where major ticks 'would; have been

mmuetzel
Tim,

This has already been fixed in the current development version of Octave which will eventually become Octave 4.4.
See: https://savannah.gnu.org/bugs/index.php?45850

In the meantime, you can work around the issue by manually setting the hidden property "xminortickvalues". E.g.:
set (gca, "xminortickvalues", 1:30)

Regards
Markus
Reply | Threaded
Open this post in threaded view
|

Re: BUG: If I manually set xticks on figure, minor x-ticks and grid miss out where major ticks 'would; have been

mmuetzel
Sorry. The name of the hidden axes property was "xmtick" in Octave 4.2. So it should be:
set(gca, 'xmtick', 1:30)
Reply | Threaded
Open this post in threaded view
|

Re: BUG: If I manually set xticks on figure, minor x-ticks and grid miss out where major ticks 'would; have been

Tim Pierce
That's very helpful, thankyou

On 18 August 2017 at 09:15, mmuetzel <[hidden email]> wrote:
Sorry. The name of the hidden axes property was "xmtick" in Octave 4.2. So it
should be:
set(gca, 'xmtick', 1:30)



--
View this message in context: http://octave.1599824.n4.nabble.com/BUG-If-I-manually-set-xticks-on-figure-minor-x-ticks-and-grid-miss-out-where-major-ticks-would-have-n-tp4684516p4684521.html
Sent from the Octave - General mailing list archive at Nabble.com.

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave