Move labels of the x and y axis to the very right / top

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Move labels of the x and y axis to the very right / top

Nis Meinert
Dear all,

I really love to use gnuplot for my daily work. However, most of the
people in my community work with ROOT, which is great for our specific
analyzing purposes but is kind of a exhausting tool for displaying the
results. In the past I successfully used gnuplot for this and I am very
happy with the results. In order to make my plots look similar with ROOT
results I have to move the labels of the x (y) axis to the very right
(top). Currently I solve this issue by hiding the xlabel via (I heavily
use TeX within my figures)

xlabel "\\phantom{...}"

so the lower margin is set automatically and placing the actual visible
label via

set label "..." at graph 1,xxx right

The problem is, that I have to figure out the correct values for xxx via
trial-and-error, whenever I change the size of the plot. Is it possible
to just move the xlabel (ylabel) to the desired position, namely the
very right (top) of the graph in a kind of automatic way?

I am very sure, that my solution is ugly and far away from the 'correct'
solution.
Just in case, there is not such a solution already implemented, I think
it is rather simple for experts to add this feature?

Find below a link of a publication that has such an orientation of the
labels:

https://arxiv.org/pdf/1507.03414v2.pdf

Thanks a lot!

Cheers,


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
gnuplot-info mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
Reply | Threaded
Open this post in threaded view
|

Re: Move labels of the x and y axis to the very right / top

Rob Sargent
While I agree you should be able to place the units where ever you wish,
I don't think just because ROOT writes them at the max end of the axes
is a good reason to do it.  The rest of us are perfectly at home with
the units in the middle.  The example publication would not be
materially effected in the least.


On 02/13/2017 01:32 AM, Nis Meinert wrote:

> Dear all,
>
> I really love to use gnuplot for my daily work. However, most of the
> people in my community work with ROOT, which is great for our specific
> analyzing purposes but is kind of a exhausting tool for displaying the
> results. In the past I successfully used gnuplot for this and I am very
> happy with the results. In order to make my plots look similar with ROOT
> results I have to move the labels of the x (y) axis to the very right
> (top). Currently I solve this issue by hiding the xlabel via (I heavily
> use TeX within my figures)
>
> xlabel "\\phantom{...}"
>
> so the lower margin is set automatically and placing the actual visible
> label via
>
> set label "..." at graph 1,xxx right
>
> The problem is, that I have to figure out the correct values for xxx via
> trial-and-error, whenever I change the size of the plot. Is it possible
> to just move the xlabel (ylabel) to the desired position, namely the
> very right (top) of the graph in a kind of automatic way?
>
> I am very sure, that my solution is ugly and far away from the 'correct'
> solution.
> Just in case, there is not such a solution already implemented, I think
> it is rather simple for experts to add this feature?
>
> Find below a link of a publication that has such an orientation of the
> labels:
>
> https://arxiv.org/pdf/1507.03414v2.pdf
>
> Thanks a lot!
>
> Cheers,
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> gnuplot-info mailing list
> [hidden email]
> Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
gnuplot-info mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
Reply | Threaded
Open this post in threaded view
|

Re: Move labels of the x and y axis to the very right / top

Hans-Bernhard Bröker-2
In reply to this post by Nis Meinert
Am 13.02.2017 um 09:32 schrieb Nis Meinert:

> set label "..." at graph 1,xxx right
>
> The problem is, that I have to figure out the correct values for xxx via
> trial-and-error,

No, you don't.  You just have to read a bit more of the documentation to
find out what this does:

        set label "..." at graph 1, graph -0.05 right

OTOH, your actual goal will probably end up being fulfilled much more
straightforwardly by

        set xlabel "something" offset graph 0.45, graph 0.0

This offset will only have to be changed if you change the font size
and/or the text of the label.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
gnuplot-info mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
Reply | Threaded
Open this post in threaded view
|

Re: Move labels of the x and y axis to the very right / top

Nis Meinert-2
In reply to this post by Rob Sargent
Thank you for your answer. I don't want to change default behavior, but
asking for an extension. I think this is easy to implement and does not
clash with any current implementations. This formatting is pretty
distributed and can be found in many famous publications, e.g.

https://arxiv.org/abs/1207.7214

Gnuplot is such an flexible tool and I wonder why it misses this basic
label alignment.


On 02/13/2017 07:36 PM, Rob Sargent wrote:

> While I agree you should be able to place the units where ever you wish,
> I don't think just because ROOT writes them at the max end of the axes
> is a good reason to do it.  The rest of us are perfectly at home with
> the units in the middle.  The example publication would not be
> materially effected in the least.
>
>
> On 02/13/2017 01:32 AM, Nis Meinert wrote:
>> Dear all,
>>
>> I really love to use gnuplot for my daily work. However, most of the
>> people in my community work with ROOT, which is great for our specific
>> analyzing purposes but is kind of a exhausting tool for displaying the
>> results. In the past I successfully used gnuplot for this and I am very
>> happy with the results. In order to make my plots look similar with ROOT
>> results I have to move the labels of the x (y) axis to the very right
>> (top). Currently I solve this issue by hiding the xlabel via (I heavily
>> use TeX within my figures)
>>
>> xlabel "\\phantom{...}"
>>
>> so the lower margin is set automatically and placing the actual visible
>> label via
>>
>> set label "..." at graph 1,xxx right
>>
>> The problem is, that I have to figure out the correct values for xxx via
>> trial-and-error, whenever I change the size of the plot. Is it possible
>> to just move the xlabel (ylabel) to the desired position, namely the
>> very right (top) of the graph in a kind of automatic way?
>>
>> I am very sure, that my solution is ugly and far away from the 'correct'
>> solution.
>> Just in case, there is not such a solution already implemented, I think
>> it is rather simple for experts to add this feature?
>>
>> Find below a link of a publication that has such an orientation of the
>> labels:
>>
>> https://arxiv.org/pdf/1507.03414v2.pdf
>>
>> Thanks a lot!
>>
>> Cheers,
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> _______________________________________________
>> gnuplot-info mailing list
>> [hidden email]
>> Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> gnuplot-info mailing list
> [hidden email]
> Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
gnuplot-info mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
Reply | Threaded
Open this post in threaded view
|

Re: Move labels of the x and y axis to the very right / top

Nis Meinert-2
In reply to this post by Hans-Bernhard Bröker-2
Thank you for your help. I agree, this is much more straightforward!
Nevertheless, I do have to update this whenever I change the label
and/or the font size. When having >100 plots this is and exhausting
task. At the same time, it is not necessary for e.g the centered xlabel,
or the key, so giving xlabel an alignment would solve this issue.


On 02/13/2017 10:12 PM, Hans-Bernhard Bröker wrote:

> Am 13.02.2017 um 09:32 schrieb Nis Meinert:
>
>> set label "..." at graph 1,xxx right
>>
>> The problem is, that I have to figure out the correct values for xxx via
>> trial-and-error,
> No, you don't.  You just have to read a bit more of the documentation to
> find out what this does:
>
> set label "..." at graph 1, graph -0.05 right
>
> OTOH, your actual goal will probably end up being fulfilled much more
> straightforwardly by
>
> set xlabel "something" offset graph 0.45, graph 0.0
>
> This offset will only have to be changed if you change the font size
> and/or the text of the label.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> gnuplot-info mailing list
> [hidden email]
> Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
gnuplot-info mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info