Re: [Veusz-discuss] using numeric data for labels
It would be quite easy to write a dataset plugin to do the conversion from data-text, but automatically allowing such expressions in plotting widgets would require some work. Jeremy On 02/10/13 22:31, Joseph Xu wrote: How hard would it be to allow text datasets to be generated from expressions? Then one can specify the number formatting with the standard python formatting strings like {:03}. On Mon, Sep 30, 2013 at 3:30 AM, Jeremy Sanders jer...@jeremysanders.net wrote: Dear All For the next release, I've added support for non-text datasets as labels. There isn't any support for how the numbers are formatted, however. It might be useful to have a number or date to text dataset plugin to do the conversion, however. Jeremy Joseph Xu wrote: Hi Benjamin: Thanks, that works! The only problem is that the labels don't automatically update when the dataset it's based on changes, but it's not a big deal. Joseph On Mon, Sep 23, 2013 at 8:47 PM, Benjamin K. Stuhl bk...@cornell.edu wrote: On 9/23/2013 5:38 PM, Joseph Xu wrote: I'm trying to make a bar chart with numeric labels at the top, kind of like this: http://www.dplot.com/barchart/barchart3_h600.png I tried to do this by adding an additional x-y plot with hidden markers and the bar chart length for both the y position and the labels. However, it seems like you can't use numeric data sets for labels. I tried some other things, like creating a dataset using str(y) for the expression, but that fails also. Is there any way to hack around this? Hi Joseph, Your idea about creating a dataset using str(y) is a good one, it just takes a bit more typing at the veusz console command line. If your numeric dataset is named 'y', you could create a text label dataset by SetDataText('y_labels', [ str(v) for v in GetData('y')[0] ]) for example. I hope this helps with your goal! Regards, -- BKS ___ Veusz-discuss mailing list Veusz-discuss@gna.org https://mail.gna.org/listinfo/veusz-discuss ___ Veusz-discuss mailing list Veusz-discuss@gna.org https://mail.gna.org/listinfo/veusz-discuss
Re: [Veusz-discuss] using numeric data for labels
How hard would it be to allow text datasets to be generated from expressions? Then one can specify the number formatting with the standard python formatting strings like {:03}. On Mon, Sep 30, 2013 at 3:30 AM, Jeremy Sanders jer...@jeremysanders.net wrote: Dear All For the next release, I've added support for non-text datasets as labels. There isn't any support for how the numbers are formatted, however. It might be useful to have a number or date to text dataset plugin to do the conversion, however. Jeremy Joseph Xu wrote: Hi Benjamin: Thanks, that works! The only problem is that the labels don't automatically update when the dataset it's based on changes, but it's not a big deal. Joseph On Mon, Sep 23, 2013 at 8:47 PM, Benjamin K. Stuhl bk...@cornell.edu wrote: On 9/23/2013 5:38 PM, Joseph Xu wrote: I'm trying to make a bar chart with numeric labels at the top, kind of like this: http://www.dplot.com/barchart/barchart3_h600.png I tried to do this by adding an additional x-y plot with hidden markers and the bar chart length for both the y position and the labels. However, it seems like you can't use numeric data sets for labels. I tried some other things, like creating a dataset using str(y) for the expression, but that fails also. Is there any way to hack around this? Hi Joseph, Your idea about creating a dataset using str(y) is a good one, it just takes a bit more typing at the veusz console command line. If your numeric dataset is named 'y', you could create a text label dataset by SetDataText('y_labels', [ str(v) for v in GetData('y')[0] ]) for example. I hope this helps with your goal! Regards, -- BKS ___ Veusz-discuss mailing list Veusz-discuss@gna.org https://mail.gna.org/listinfo/veusz-discuss ___ Veusz-discuss mailing list Veusz-discuss@gna.org https://mail.gna.org/listinfo/veusz-discuss
Re: [Veusz-discuss] using numeric data for labels
Dear All For the next release, I've added support for non-text datasets as labels. There isn't any support for how the numbers are formatted, however. It might be useful to have a number or date to text dataset plugin to do the conversion, however. Jeremy Joseph Xu wrote: Hi Benjamin: Thanks, that works! The only problem is that the labels don't automatically update when the dataset it's based on changes, but it's not a big deal. Joseph On Mon, Sep 23, 2013 at 8:47 PM, Benjamin K. Stuhl bk...@cornell.edu wrote: On 9/23/2013 5:38 PM, Joseph Xu wrote: I'm trying to make a bar chart with numeric labels at the top, kind of like this: http://www.dplot.com/barchart/barchart3_h600.png I tried to do this by adding an additional x-y plot with hidden markers and the bar chart length for both the y position and the labels. However, it seems like you can't use numeric data sets for labels. I tried some other things, like creating a dataset using str(y) for the expression, but that fails also. Is there any way to hack around this? Hi Joseph, Your idea about creating a dataset using str(y) is a good one, it just takes a bit more typing at the veusz console command line. If your numeric dataset is named 'y', you could create a text label dataset by SetDataText('y_labels', [ str(v) for v in GetData('y')[0] ]) for example. I hope this helps with your goal! Regards, -- BKS ___ Veusz-discuss mailing list Veusz-discuss@gna.org https://mail.gna.org/listinfo/veusz-discuss
[Veusz-discuss] using numeric data for labels
Hi: I'm trying to make a bar chart with numeric labels at the top, kind of like this: http://www.dplot.com/barchart/barchart3_h600.png I tried to do this by adding an additional x-y plot with hidden markers and the bar chart length for both the y position and the labels. However, it seems like you can't use numeric data sets for labels. I tried some other things, like creating a dataset using str(y) for the expression, but that fails also. Is there any way to hack around this? Thanks. Joseph ___ Veusz-discuss mailing list Veusz-discuss@gna.org https://mail.gna.org/listinfo/veusz-discuss
Re: [Veusz-discuss] using numeric data for labels
On 9/23/2013 5:38 PM, Joseph Xu wrote: I'm trying to make a bar chart with numeric labels at the top, kind of like this: http://www.dplot.com/barchart/barchart3_h600.png I tried to do this by adding an additional x-y plot with hidden markers and the bar chart length for both the y position and the labels. However, it seems like you can't use numeric data sets for labels. I tried some other things, like creating a dataset using str(y) for the expression, but that fails also. Is there any way to hack around this? Hi Joseph, Your idea about creating a dataset using str(y) is a good one, it just takes a bit more typing at the veusz console command line. If your numeric dataset is named 'y', you could create a text label dataset by SetDataText('y_labels', [ str(v) for v in GetData('y')[0] ]) for example. I hope this helps with your goal! Regards, -- BKS ___ Veusz-discuss mailing list Veusz-discuss@gna.org https://mail.gna.org/listinfo/veusz-discuss
Re: [Veusz-discuss] using numeric data for labels
Hi Benjamin: Thanks, that works! The only problem is that the labels don't automatically update when the dataset it's based on changes, but it's not a big deal. Joseph On Mon, Sep 23, 2013 at 8:47 PM, Benjamin K. Stuhl bk...@cornell.edu wrote: On 9/23/2013 5:38 PM, Joseph Xu wrote: I'm trying to make a bar chart with numeric labels at the top, kind of like this: http://www.dplot.com/barchart/barchart3_h600.png I tried to do this by adding an additional x-y plot with hidden markers and the bar chart length for both the y position and the labels. However, it seems like you can't use numeric data sets for labels. I tried some other things, like creating a dataset using str(y) for the expression, but that fails also. Is there any way to hack around this? Hi Joseph, Your idea about creating a dataset using str(y) is a good one, it just takes a bit more typing at the veusz console command line. If your numeric dataset is named 'y', you could create a text label dataset by SetDataText('y_labels', [ str(v) for v in GetData('y')[0] ]) for example. I hope this helps with your goal! Regards, -- BKS ___ Veusz-discuss mailing list Veusz-discuss@gna.org https://mail.gna.org/listinfo/veusz-discuss