Menu

#460 Please allow inverted axes y1x1 etc.

None
open
nobody
None
None
2017-02-13
2017-02-13
No

Feature request regarding histograms: The smooth frequency feature counts records with equal first field generating h(x). Another natural use case, however, is a combined plot of y(t) and h(y) sharing a vertical axis for y. I tried "using (bin(t)):(1.0) smooth frequency axes y1x2", which leads to "axes must be x1y1, x1y2, x2y1 or x2y2". If there is a good reason for that limitation, Plan B would be a switch to let smooth frequency count records with equal second field (after the : of using).

Discussion

  • Ethan Merritt

    Ethan Merritt - 2017-02-13

    I do not understand exactly what you are asking for, but perhaps this example is related:

    http://gnuplot.sourceforge.net/demo_cvs/violinplot.html

     
  • Ethan Merritt

    Ethan Merritt - 2017-02-13

    Ticket moved from /p/gnuplot/bugs/1907/

    Can't be converted:

    • _milestone:
    • _priority:
     
  • Rainald Koch

    Rainald Koch - 2017-02-13
    set terminal wxt size 300,600 enhanced font ',14' persist
    set print $data_y_versus_t
    tMax = 3000
    alpha = 0.02
    y = 1
    do for [t=1:tMax] {
        y = y*(1-alpha) + alpha*2.*rand(0)
        print sprintf("%d %5.3g",t,y)
    }
    unset print
    unset key
    set xlabel "y(t), y" font ",14"
    set y2label "t, h(y)" font ",14"
    set xrange [0:1.3]
    set yrange [0:tMax]
    set y2range [0:100000]
    unset xtics
    unset ytics
    plot $data_y_versus_t using 2:1 w lines lt 10,\
    '' using 2:(1) smooth kdensity bandwidth 0.02 axes x1y2 w lines lt 9
    

    This is the required relation between y(t) and h(y), but the t axis is vertical instead of horizontal. We should not need a workaround to swap axes.

    Sorry for the dead attachment links.

     

    Last edit: Rainald Koch 2017-02-18

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.