Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #2585 > unrolled thread

controlling amount of xtics

Started byKalin Kozhuharov <me.kalin@gmail.com>
First post2014-09-18 19:05 -0700
Last post2014-09-24 07:21 -0700
Articles 3 — 2 participants

Back to article view | Back to comp.graphics.apps.gnuplot


Contents

  controlling amount of xtics Kalin Kozhuharov <me.kalin@gmail.com> - 2014-09-18 19:05 -0700
    Re: controlling amount of xtics Ethan A Merritt <EAMerritt@gmail.com> - 2014-09-18 22:17 -0700
      Re: controlling amount of xtics Kalin Kozhuharov <me.kalin@gmail.com> - 2014-09-24 07:21 -0700

#2585 — controlling amount of xtics

FromKalin Kozhuharov <me.kalin@gmail.com>
Date2014-09-18 19:05 -0700
Subjectcontrolling amount of xtics
Message-ID<9823b0ef-6c28-4118-9fbe-fb5ba9dbbcdf@googlegroups.com>
Hello,

I often need long strings for xtics, like full timestamps; example: http://gamma.tar.bz/nGeigies/42.png
code: https://github.com/thinrope/fixed_sensor_visualization/blob/master/timeplot.gpl

Depending on the time such plot is generated, the number of xtics is changing +/- 1 and when it is +1 it is too crowded.

Is there a way to say I want "no more than N xtics", without having to specify their position/label explicitly?

Or some other way to restrict too crowded labels?
Ideally gnuplot should take into consideration the rendered width of (at least) fixed labels and space them appropriately, but I know that is too hard in general.

Kalin.

[toc] | [next] | [standalone]


#2586

FromEthan A Merritt <EAMerritt@gmail.com>
Date2014-09-18 22:17 -0700
Message-ID<lvge8l$qp7$1@dont-email.me>
In reply to#2585
Kalin Kozhuharov wrote:

> Hello,
> 
> I often need long strings for xtics, like full timestamps; example:
> http://gamma.tar.bz/nGeigies/42.png code:
> https://github.com/thinrope/fixed_sensor_visualization/blob/master/timeplot.gpl
> 
> Depending on the time such plot is generated, the number of xtics is
> changing +/- 1 and when it is +1 it is too crowded.
> 
> Is there a way to say I want "no more than N xtics", without having to
> specify their position/label explicitly?
> 
> Or some other way to restrict too crowded labels?

The usual thing is to tilt the labels downward by 45°.
    set xtics rotate by -45 left


> Ideally gnuplot should take into consideration the rendered width of
> (at least) fixed labels and space them appropriately, but I know that
> is too hard in general.
> 
> Kalin.

[toc] | [prev] | [next] | [standalone]


#2594

FromKalin Kozhuharov <me.kalin@gmail.com>
Date2014-09-24 07:21 -0700
Message-ID<19c6d5ce-6b39-4456-b765-9c5ba104017a@googlegroups.com>
In reply to#2586
On Friday, September 19, 2014 2:17:09 PM UTC+9, Ethan A Merritt wrote:
> Kalin Kozhuharov wrote:
> > I often need long strings for xtics, like full timestamps; example:
> > http://gamma.tar.bz/nGeigies/42.png code:
> > https://github.com/thinrope/fixed_sensor_visualization/blob/master/timeplot.gpl
> > Depending on the time such plot is generated, the number of xtics is
> > changing +/- 1 and when it is +1 it is too crowded.
> > 
> > Is there a way to say I want "no more than N xtics", without having to
> > specify their position/label explicitly?
> > Or some other way to restrict too crowded labels?
> 
> The usual thing is to tilt the labels downward by 45°.
>     set xtics rotate by -45 left
>
Yeah, I have played before with that and various degrees, but it makes the graphs too tall and is usually quite ugly for 2-line labels ("%Y-%m-%d\n%H:%M").

I guess I'll need to babysit gnuplot telling it to make (say) 4 tics starting from current week.
Or is there a way to pre-render the xtics? Like get a list of what xtics are to be plotted, then modify the list?

Kalin.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.graphics.apps.gnuplot


csiph-web