Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dataid with space #31

Closed
setop opened this issue Aug 28, 2017 · 3 comments
Closed

dataid with space #31

setop opened this issue Aug 28, 2017 · 3 comments

Comments

@setop
Copy link

setop commented Aug 28, 2017

I'd like to be able to plot data separated by tabs, with data id having space in their names.
I use command feedgnuplot --domain --dataid --autolegend --lines --points --exit --dump < sample.txt

With data like :

4<tab>"A"<tab>34
4<tab>"B"<tab>8
5<tab>"A"<tab>15
5<tab>"B"<tab>13
6<tab>"A"<tab>23
6<tab>"B"<tab>16

I got :

set style data linespoints
set grid
set boxwidth 1
histbin(x) = 1 * floor(0.5 + x/1)
set xtics
plot '-'   title "A"   , '-'   title "B"   
4 34
5 15
6 23
e
4 8
5 13
6 16
e

as expected.

With data like :

4<tab>"A space"<tab>34
4<tab>"B space"<tab>8
5<tab>"A space"<tab>15
5<tab>"B space"<tab>13
6<tab>"A space"<tab>23
6<tab>"B space"<tab>16

I got

set style data linespoints
set grid
set boxwidth 1
histbin(x) = 1 * floor(0.5 + x/1)
set xtics
plot '-'   title ""A"   , '-'   title ""B"   
4 space"
5 space"
6 space"
e
4 space"
5 space"
6 space"
e

not what I expect.

@dkogan
Copy link
Owner

dkogan commented Sep 4, 2017

Hi. The intent was to keep everything compatible with existing UNIX parsing tools such as awk or cut or perl -F. So given that, the default behavior is what I want. We COULD implement a 'field separator' flag (again, like in awk and perl) to provide this behavior. Do you want to give me a patch?

Oh, and if all you want is to get a nice curve legend with spaces in it, you can use --legend.

@dkogan
Copy link
Owner

dkogan commented Sep 4, 2017

I mean 'perl -a', not 'perl -F'

@dkogan
Copy link
Owner

dkogan commented Jul 17, 2018

Closing this. I don't think it makes sense to implement this.

@dkogan dkogan closed this as completed Jul 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants