|
From: Thomas S. <t.s...@fz...> - 2008-03-03 11:40:16
|
if your xrange is 20 weeks or lower , e.g.
set xrange ["01/01/2007":"20/05/2007"]
everything works as expected, but if you exceed 20 weeks,
set xrange ["01/01/2007":"21/05/2007"]
xtics are placed at 'beginning of month' and mxtics are drawn
at wrong positions.
this behaviour has nothing to do with the actual number of tics
on the x-axis.
it seems to be some mechanism in 'axis.c' which should prevent
the axis from getting overcrowded with tics.
(see 'quantize_time_tics' in 'axis.c' which is calling
'quantize_duodecimal_tics' or - as in your case -
'quantize_normal_tics')
don't know how to solve this :-(
thomas
Cameron Horsburgh wrote:
>
> Hi folks,
>
> I'm using the Debian version of gnuplot 4.2 patchlevel 2.
>
> I have a file (data.dat) with two columns. The first contains
> dates and the other contains measured data:
>
> 03/03/2007 89.8
> 04/04/2007 85.4
> 05/05/2007 79.0
> 12/06/2007 78.3
> 18/07/2007 77.0
> 13/09/2007 65.6
> 29/12/2007 65.0
>
> I wish to graph my data (y axis) against the date (x axis).
> I want the x axis to show day of the month and the month, and
> increment weekly. So I use the following list of commands:
>
>
>
> set xdata time
> set timefmt "%d/%m/%Y"
> set format x "%d/%m"
> set xtics "03/03/2007",604800 # number of seconds in a week
> plot "data.dat" using 1:2 notitle
>
>
>
> The output isn't what I expect. The major tics all seem to round to
> the first day of the month and several minor tics appear after each
> major. If I change a few things around --- for example, change the x
> format to other units, change the increment size, etc, the same thing
> happens. All xtics round to the nearest first of the month.
>
> The data itself plots correctly
>
> I've looked through the documentation but I seem to be missing
> something fairly obvious. Can anyone help?
>
> --
>
> =============================================
> Cameron Horsburgh
>
> =============================================
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Gnuplot-info mailing list
> Gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
>
--
View this message in context: http://www.nabble.com/Problem-with-date-format-tp15798572p15799973.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|