Abolfazl
Abolfazl

Reputation: 453

polar plot in gnuplot putting ytics at the center of the plot

I want to put xlabel and ylabel beside their axis at right and above respectively. then I want to set ytics beside the axis not at the left. Here is my data.

#!usr/bin/gnuplot
unset border
set xzeroaxis
set yzeroaxis
set polar
set nokey
set xtics 0.05
set ytics 0.01
set autoscale fix
set label " k=0.2 "  at   0.012,   0.0095
set label " k=0.3 "  at   0.022,   0.015
set label " k=0.4 "  at   0.032,   0.025
#unset border
#set notics
unset xtics
set ytics
set xlabel "kx"
set ylabel "ky"
plot "T1.txt" u 1:2 w l ,"T2.txt" u 1:2 w l , "T3.txt" u 1:2 w l 

Upvotes: 2

Views: 222

Answers (1)

Matthew
Matthew

Reputation: 7590

It sounds like you want to produce the following plot

enter image description here

Gnuplot has 2 x axes and 2 y axes names x1, x2, y1, and y2. When you just specify the x or y axis, you are actually working with the x1 and y1 axis. The other two are opposite. So to get the labels as you want, we just use the x2 and y2 labels

set x2lab "kx"
set y2lab "ky"

As far as the y-axis marks, gnuplot can put them on the border or on the axis (see help xtics, ytics are similar). Thus, to put the ytics on the axis itself, we just issue

set ytics axis

Upvotes: 1

Related Questions