4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

z軸ラベルを回転させました(gnuplot)

Last updated at Posted at 2016-07-16

###gnuplot で3次元散布図を描画。

EPS形式で保存する。

軸ラベルを日本語表記にしたい場合、文字コードを指定。
今回は文字コードEUCとして保存。
set terminal postscript eps enhanced "GothicBBB-Medium-EUC-H" 20

軸ラベルを設定。とりあえずz軸。
set zlabel "aaa"

z軸ラベルを反時計回りに90度回転。
set zlabel rotate by 90

メモリのラベルも同じようにして回転できる。
set xtics rotate by 90

###c言語でgnuplot動かしているので、実際はこうです。

plot.c
#include <stdio.h>
#include <stdlib.h>

int main(){
    FILE *gp0;
    gp0 = popen("gnuplot","w");// パイプ接続popen()関数                                                                                                            
    fprintf(gp0, "set zrange[0:10]\n");
    fprintf(gp0, "set zlabel \"aaa\"\n");
    fprintf(gp0, "set zlabel rotate by 90\n");
    //色々ぷろっと
    fflush(gp0);
    fprintf(gp0,"pause 5\n);
    pclose(gp0);
 
    return 0;

###参考にさせていただいたサイト

http://www.eng.kagawa-u.ac.jp/~haruna/memo/gnuplot/gnuC.html
http://www.obihiro.ac.jp/~suzukim/masuda/utils/gnuplot.html
http://d.hatena.ne.jp/naga_sawa/20130109/1357717527

4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?