getting higher points of the lc palette to the front

Help
hidetzugu
2014-07-05
2014-07-05
  • hidetzugu

    hidetzugu - 2014-07-05

    Hi, I was wondering how to control what points are put in the front when using lc palette. if you look at this plot...

    palette plot

    ... you will notice that the points with LOWER "P value" are in front of the ones with HIGHER "P value". I would like to REVERSE this.

    In case its not perfectly clear, I would like my plot to look like a "lc palette version" of this:

    no palette plot

    Thanks in advance for the help

    edit: in my browser at least the color code bar on the right was cut so the image fits the page, this can be easily fixed opening the image in another tab but I will mention that "yellow is higher, so I want yellow in the front" just in case.

     
    Last edit: hidetzugu 2014-07-05
  • Ethan Merritt

    Ethan Merritt - 2014-07-05

    set view map
    set hidden3d
    splot FOO using 1:2:3 with points lc palette

     
    • hidetzugu

      hidetzugu - 2014-07-05

      that pretty much generates exacly the plot above (or a variation of it). but it still puts the points with "lower $3" in the front.

      What I want to know is how to put the points with "higher $3" in the front.

       
      Last edit: hidetzugu 2014-07-05
  • Ethan Merritt

    Ethan Merritt - 2014-07-05

    Perhaps you should tell us the specific version of gnuplot you are using, and show the entire sequence of plot commands. To the best of my knowledge the commands I showed should do exactly what you want.

     
  • hidetzugu

    hidetzugu - 2014-07-05

    My version of gnuplot is 4.6 and I'm running it of a script with the following commands (the 2nd plot is a hack I made to explain what I want):

    set view map
    set hidden3d

    set output "pallete_mixall_splot.png"

    splot inputfiles using 1:2:3 w d lc >palette t "colour for P value"

    set output "pallete_mixall_splot_hacked.png"

    splot inputfiles using 1:2:3 w >d lc palette t "colour for P value"

    This produces, respectively:
    normal plot
    hacked plot
    What I need, is to setup the plot so what the points with higher value on the colour scale are in front of the ones with lower value. So the plot would look like the hacked version (with the correct values on the colour scale of course).

    Has a way to "switch which layer is in front" not been contemplated? like you would by just switching the order of the plots on a multiplot (like I did in the initial post)?

     
    Last edit: hidetzugu 2014-07-05
    • Edoardo Pasca

      Edoardo Pasca - 2014-07-05

      I would sort the data with a awk script (or something) before plotting.
      This may be achieved by

      splot '< awk -f somescript.awk inputfiles' using 1:2:3 w d lc >palette t
      "colour for P value"

      Edo

      e-mail sent with my mobile: excuses for typos and conciseness.
      On 5 Jul 2014 21:55, "hidetzugu" hidetzugu@users.sf.net wrote:

      My version of gnuplot is 4.6 and I'm running it of a script with the
      following commands:

      set view map
      set hidden3d

      set output "pallete_mixall_splot.png"

      splot inputfiles using 1:2:3 w d lc >palette t "colour for P value"

      set output "pallete_mixall_splot_hacked.png"

      splot inputfiles using 1:2:3 w >d lc palette t "colour for P value"

      This produces, respectively:
      [image: normal plot]
      [image: hacked plot]
      What I need, is to setup the plot so what the points with higher value
      on the colour scale are in front of the ones with lower value
      . So the
      plot would look like the hacked version (with the correct values on the
      colour scale of course).

      Has a way to "switch which layer is in front" not been contemplated? like
      you would by just switching the order of the plots on a multiplot (like I
      did in the initial post)?


      getting higher points of the lc palette to the front
      https://sourceforge.net/p/gnuplot/discussion/5925/thread/31015f34/?limit=25#df57


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/gnuplot/discussion/5925/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
      • hidetzugu

        hidetzugu - 2014-07-05

        sorting the data won't solve my problem, since gnuplot will still print the lower colour values in in front of the higher ones by default. when I want it to print the higher in front of the lower.

        I can (and, if I was on a deadline, would already have) simply use image editing tools paste a correct colour key on my "hacked pictures". But I would prefer using a cleaner solution if is available.

         
  • Ethan Merritt

    Ethan Merritt - 2014-07-05

    Ah, got it.
    I forgot that "set view map" leaves the z axis pointing away from you rather than towards you.

    OK, then you want

    splot inputfiles using 1:2:(-$3):3 w d lc palette

     
    • hidetzugu

      hidetzugu - 2014-07-05

      perfect! just what I wanted! thank you.

       

Log in to post a comment.