|
From: Justace C. <pro...@co...> - 2004-03-05 15:23:39
|
Cool, My stuff is almost working and with the image patch much faster. The new deal is this. Since I am generating a correlation matrix with respect to one set of channels, i.e. the channels correlated with themselves, half of the matrix is useless. Specifically the upper left of the diagonal. So, to cut back on my calculation time I fill that region with NaN, but how do I put that in gnuplot so that it does not plot it? I was putting it in as a -2 and then telling it to only plot [-1:1] on the z but that was silly since it is a 2D plot. Maybe the image style needs to have an internal variable that the user can set to define NaN's. That way I could go and set that to -2 and when image converts the float to a color it goes ohhh this is a NaN, what fill style should I use here or what predefined color do I have for NaN. Just some thoughts and questions here. Justace |
|
From: Petr M. <mi...@ph...> - 2004-03-05 16:28:08
|
> region with NaN, but how do I put that in gnuplot so that it does not > plot it? I was putting it in as a -2 and then telling it to only plot > [-1:1] on the z but that was silly since it is a 2D plot. Maybe the > image style needs to have an internal variable that the user can set to > define NaN's. That way I could go and set that to -2 and when image > converts the float to a color it goes ohhh this is a NaN, what fill > style should I use here or what predefined color do I have for NaN. You generate a discrete palette (palette can be red from a file), set the first color to white, and then apply a filter so that the invisible range is mapped to white, and the rest to the remaining palette entries. I do it this way from Octave. How to do it more easily (in future)? "With image", colors of all pixels have to be defined. So there would have to be "set palette backgroundcolor", and "with image" would have to accept the "set zrange" window. Or the background colour could be that of linetype e.g. -2? --- Petr Mikulik |
|
From: Justace C. <pro...@co...> - 2004-03-05 19:30:47
|
Ok, So this might not be a question for this list but here goes. I have used the set palette defined to (1 "red", 2 "white", 3 "blue") and that shows the data greatly. And I set cbrange to [-1:1]. Now all the -2 values are set to bright red, as they should be. Is there a syntax where I can say I want to interpolate the colors between like -1 and 0 as red to white, between 0 and 1 interpolate between white and blue and all colors from -1 and down go to black? I am sure there is a way to do this, without makeing a huge color xref file. The help documentation for the set palette is kinda confusing. Thanks for the help. Justace On Fri, 2004-03-05 at 10:21, Petr Mikulik wrote: > > region with NaN, but how do I put that in gnuplot so that it does not > > plot it? I was putting it in as a -2 and then telling it to only plot > > [-1:1] on the z but that was silly since it is a 2D plot. Maybe the > > image style needs to have an internal variable that the user can set to > > define NaN's. That way I could go and set that to -2 and when image > > converts the float to a color it goes ohhh this is a NaN, what fill > > style should I use here or what predefined color do I have for NaN. > > You generate a discrete palette (palette can be red from a file), set the > first color to white, and then apply a filter so that the invisible range is > mapped to white, and the rest to the remaining palette entries. I do it this > way from Octave. > > How to do it more easily (in future)? "With image", colors of all pixels > have to be defined. So there would have to be "set palette backgroundcolor", > and "with image" would have to accept the "set zrange" window. Or the > background colour could be that of linetype e.g. -2? > > --- > Petr Mikulik > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > gnuplot-beta mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |
|
From: Justace C. <pro...@co...> - 2004-03-05 20:03:04
|
I reply to my own message: Got it to work by using (-1 "white", -1 "red", 0 "white", 1 "blue"). Justace On Fri, 2004-03-05 at 13:22, Justace Clutter wrote: > Ok, > > So this might not be a question for this list but here goes. I have > used the set palette defined to (1 "red", 2 "white", 3 "blue") and that > shows the data greatly. And I set cbrange to [-1:1]. Now all the -2 > values are set to bright red, as they should be. Is there a syntax > where I can say I want to interpolate the colors between like -1 and 0 > as red to white, between 0 and 1 interpolate between white and blue and > all colors from -1 and down go to black? I am sure there is a way to do > this, without makeing a huge color xref file. The help documentation > for the set palette is kinda confusing. Thanks for the help. > > Justace > > On Fri, 2004-03-05 at 10:21, Petr Mikulik wrote: > > > region with NaN, but how do I put that in gnuplot so that it does not > > > plot it? I was putting it in as a -2 and then telling it to only plot > > > [-1:1] on the z but that was silly since it is a 2D plot. Maybe the > > > image style needs to have an internal variable that the user can set to > > > define NaN's. That way I could go and set that to -2 and when image > > > converts the float to a color it goes ohhh this is a NaN, what fill > > > style should I use here or what predefined color do I have for NaN. > > > > You generate a discrete palette (palette can be red from a file), set the > > first color to white, and then apply a filter so that the invisible range is > > mapped to white, and the rest to the remaining palette entries. I do it this > > way from Octave. > > > > How to do it more easily (in future)? "With image", colors of all pixels > > have to be defined. So there would have to be "set palette backgroundcolor", > > and "with image" would have to accept the "set zrange" window. Or the > > background colour could be that of linetype e.g. -2? > > > > --- > > Petr Mikulik > > > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: IBM Linux Tutorials > > Free Linux tutorial presented by Daniel Robbins, President and CEO of > > GenToo technologies. Learn everything from fundamentals to system > > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > > _______________________________________________ > > gnuplot-beta mailing list > > gnu...@li... > > https://lists.sourceforge.net/lists/listinfo/gnuplot-beta > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > gnuplot-beta mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-beta |
|
From: Daniel J S. <dan...@ie...> - 2004-03-05 16:40:24
|
Justace Clutter wrote: >Cool, > > My stuff is almost working and with the image patch much faster. The >new deal is this. Since I am generating a correlation matrix with >respect to one set of channels, i.e. the channels correlated with >themselves, half of the matrix is useless. Specifically the upper left >of the diagonal. So, to cut back on my calculation time I fill that >region with NaN, but how do I put that in gnuplot so that it does not >plot it? I was putting it in as a -2 and then telling it to only plot >[-1:1] on the z but that was silly since it is a 2D plot. Maybe the >image style needs to have an internal variable that the user can set to >define NaN's. That way I could go and set that to -2 and when image >converts the float to a color it goes ohhh this is a NaN, what fill >style should I use here or what predefined color do I have for NaN. >Just some thoughts and questions here. > For your correlation matrix, you might want to simply replicate the other half since it is probably Hermitian symmetric, of if you are working with real signals, outright symmetric. In any case, your idea of mapping to a certain value might work. It may cause a problem with automatic scaling of the color axis. However, you should be able to manually set the color axis so that your "NaN" number gets mapped to white. For example, set the color map some how to [-1:1] and then make your "NaN" be a +2 (Or -2, whichever gets mapped to the white value.) Dan |