Plotting multiple files' word dispersion plot in one single plot in Python Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Moderator Election Q&A - Questionnaire 2019 Community Moderator Election ResultsCan someone explain the following error in my python code?Writing custom data analysis programMulti Model data set Visualization PythonHow to train Syllables instead of phones using HTK?Plotting multivariate linear regressionEntity Recognition in Stanford NLP using PythonTensorflow CNN sometimes converges, sometimes notPlotting in Multiple Linear Regression in Python 3k-mean without labelMerging dataframes in Pandas is taking a surprisingly long time

Why is "Captain Marvel" translated as male in Portugal?

How to market an anarchic city as a tourism spot to people living in civilized areas?

Limit for e and 1/e

Two different pronunciation of "понял"

Can I throw a longsword at someone?

Is above average number of years spent on PhD considered a red flag in future academia or industry positions?

How do you clear the ApexPages.getMessages() collection in a test?

Did the new image of black hole confirm the general theory of relativity?

Can a zero nonce be safely used with AES-GCM if the key is random and never used again?

Working around an AWS network ACL rule limit

I'm having difficulty getting my players to do stuff in a sandbox campaign

Single author papers against my advisor's will?

Stop battery usage [Ubuntu 18]

Stopping real property loss from eroding embankment

Is there a documented rationale why the House Ways and Means chairman can demand tax info?

How is simplicity better than precision and clarity in prose?

Blender game recording at the wrong time

Do working physicists consider Newtonian mechanics to be "falsified"?

Autumning in love

Direct Experience of Meditation

New Order #5: where Fibonacci and Beatty meet at Wythoff

Why does tar appear to skip file contents when output file is /dev/null?

Can I add database to AWS RDS MySQL without creating new instance?

When communicating altitude with a '9' in it, should it be pronounced "nine hundred" or "niner hundred"?



Plotting multiple files' word dispersion plot in one single plot in Python



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
2019 Moderator Election Q&A - Questionnaire
2019 Community Moderator Election ResultsCan someone explain the following error in my python code?Writing custom data analysis programMulti Model data set Visualization PythonHow to train Syllables instead of phones using HTK?Plotting multivariate linear regressionEntity Recognition in Stanford NLP using PythonTensorflow CNN sometimes converges, sometimes notPlotting in Multiple Linear Regression in Python 3k-mean without labelMerging dataframes in Pandas is taking a surprisingly long time










0












$begingroup$


I have several files, and for each of them I want to visualize the dispersion plot of a word x.
Using nltk and matplotlib, I run the following code:



files = [file1,file2,file3,file4,file5,file6,file7,file8,file9]
for file in files:
plt.figure()
topics = ['myword']
file.dispersion_plot(topics)


What I obtained are of course 9 different plots, each showing the dispersion plot of the related file.
Is there a way to group all the dispersion plots in ONE single plot for comparison? In that case, I would show the file names in plt.yticks()










share|improve this question









$endgroup$











  • $begingroup$
    Can you concat all the files into 1 ? Or do you need to retain file-level information in plot ?
    $endgroup$
    – Shamit Verma
    Apr 4 at 5:07










  • $begingroup$
    My goal is to show and compare distributions across samples, so ideally I would have all files' distribution plots plotted as parallel horizontal lines, rather than a single, long line
    $endgroup$
    – Camilla
    Apr 4 at 6:52















0












$begingroup$


I have several files, and for each of them I want to visualize the dispersion plot of a word x.
Using nltk and matplotlib, I run the following code:



files = [file1,file2,file3,file4,file5,file6,file7,file8,file9]
for file in files:
plt.figure()
topics = ['myword']
file.dispersion_plot(topics)


What I obtained are of course 9 different plots, each showing the dispersion plot of the related file.
Is there a way to group all the dispersion plots in ONE single plot for comparison? In that case, I would show the file names in plt.yticks()










share|improve this question









$endgroup$











  • $begingroup$
    Can you concat all the files into 1 ? Or do you need to retain file-level information in plot ?
    $endgroup$
    – Shamit Verma
    Apr 4 at 5:07










  • $begingroup$
    My goal is to show and compare distributions across samples, so ideally I would have all files' distribution plots plotted as parallel horizontal lines, rather than a single, long line
    $endgroup$
    – Camilla
    Apr 4 at 6:52













0












0








0





$begingroup$


I have several files, and for each of them I want to visualize the dispersion plot of a word x.
Using nltk and matplotlib, I run the following code:



files = [file1,file2,file3,file4,file5,file6,file7,file8,file9]
for file in files:
plt.figure()
topics = ['myword']
file.dispersion_plot(topics)


What I obtained are of course 9 different plots, each showing the dispersion plot of the related file.
Is there a way to group all the dispersion plots in ONE single plot for comparison? In that case, I would show the file names in plt.yticks()










share|improve this question









$endgroup$




I have several files, and for each of them I want to visualize the dispersion plot of a word x.
Using nltk and matplotlib, I run the following code:



files = [file1,file2,file3,file4,file5,file6,file7,file8,file9]
for file in files:
plt.figure()
topics = ['myword']
file.dispersion_plot(topics)


What I obtained are of course 9 different plots, each showing the dispersion plot of the related file.
Is there a way to group all the dispersion plots in ONE single plot for comparison? In that case, I would show the file names in plt.yticks()







python matplotlib






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Apr 4 at 2:47









CamillaCamilla

84




84











  • $begingroup$
    Can you concat all the files into 1 ? Or do you need to retain file-level information in plot ?
    $endgroup$
    – Shamit Verma
    Apr 4 at 5:07










  • $begingroup$
    My goal is to show and compare distributions across samples, so ideally I would have all files' distribution plots plotted as parallel horizontal lines, rather than a single, long line
    $endgroup$
    – Camilla
    Apr 4 at 6:52
















  • $begingroup$
    Can you concat all the files into 1 ? Or do you need to retain file-level information in plot ?
    $endgroup$
    – Shamit Verma
    Apr 4 at 5:07










  • $begingroup$
    My goal is to show and compare distributions across samples, so ideally I would have all files' distribution plots plotted as parallel horizontal lines, rather than a single, long line
    $endgroup$
    – Camilla
    Apr 4 at 6:52















$begingroup$
Can you concat all the files into 1 ? Or do you need to retain file-level information in plot ?
$endgroup$
– Shamit Verma
Apr 4 at 5:07




$begingroup$
Can you concat all the files into 1 ? Or do you need to retain file-level information in plot ?
$endgroup$
– Shamit Verma
Apr 4 at 5:07












$begingroup$
My goal is to show and compare distributions across samples, so ideally I would have all files' distribution plots plotted as parallel horizontal lines, rather than a single, long line
$endgroup$
– Camilla
Apr 4 at 6:52




$begingroup$
My goal is to show and compare distributions across samples, so ideally I would have all files' distribution plots plotted as parallel horizontal lines, rather than a single, long line
$endgroup$
– Camilla
Apr 4 at 6:52










0






active

oldest

votes












Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "557"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f48564%2fplotting-multiple-files-word-dispersion-plot-in-one-single-plot-in-python%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Data Science Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f48564%2fplotting-multiple-files-word-dispersion-plot-in-one-single-plot-in-python%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Rank groups within a grouped sequence of TRUE/FALSE and NAGrouping functions (tapply, by, aggregate) and the *apply familyCharacters counting and subletting specific patternsWhat is the purpose of setting a key in data.table?data.table vs dplyr: can one do something well the other can't or does poorly?how to make a bar plot for a list of dataframes?How to group by unique values in a list in RPandas - Alternative to rank() function that gives unique ordinal ranks for a columnRank within group in for loop in RData transformation: from dyadic to observational data in RGetting map from purrr to work with paste0

Are all passive ability checks floors for active ability checks?Does passive perception supersede active perception?Which skills can be used passively?Active Opposition with Free-Form Professions in Fate5E Trap/Ambush/Stealth Mechanics VS Passive Perception ConfusionInteraction between perception and stealth in obscured conditionsHow does Keen Sight affect Passive Perception?Are all d20 rolls either attacks, saves or ability checks?Can players declare that they are making a specific ability check?Can I see a Hidden creature that is not obscured at all?Can a Stealth check ever be made passively?Is this alternate version of the Observant feat balanced?What is the minimum amount of skill points per HD?

Quoting Keynes in a lectureIs differentiated instruction permitted by universities?How to make students learn prerequisitesUnsatisfactory Instructor Evaluations: balancing of expectations of engineering studentsWhat is the difference between a “statistician”, “applied statistician”, and an academic applying advanced stats within their field?Listing in reference section, but not quotingHow to efficiently use time while preparing for a class?Graduate Admissions: Teaching Emphasisstrategies for sharing teaching information with universities I don't personally have contacts withIs there an efficient way to give a large class of students feedback about their assignments?Is it unreasonable to expect students to read the lecture notes before attending the first class?