Save panda boxplot as image The Next CEO of Stack OverflowSelecting multiple columns in a pandas dataframeRenaming columns in pandasAdding new column to existing DataFrame in Python pandasDelete column from pandas DataFrame by column name“Large data” work flows using pandasHow to iterate over rows in a DataFrame in Pandas?Select rows from a DataFrame based on values in a column in pandasGet list from pandas DataFrame column headersPandas and Python image to numpy arrayPandas DataFrame Slicing issue
What does convergence in distribution "in the Gromov–Hausdorff" sense mean?
Unreliable Magic - Is it worth it?
Bold, vivid family
Do I need to enable Dev Hub in my PROD Org?
How to start emacs in "nothing" mode (`fundamental-mode`)
Is "for causing autism in X" grammatical?
If a black hole is created from light, can this black hole then move at speed of light?
Why am I allowed to create multiple unique pointers from a single object?
Why do we use the plural of movies in this phrase "We went to the movies last night."?
Should I tutor a student who I know has cheated on their homework?
Which tube will fit a -(700 x 25c) wheel?
Multiple labels for a single equation
What exact does MIB represent in SNMP? How is it different from OID?
Skipping indices in a product
How do scammers retract money, while you can’t?
What connection does MS Office have to Netscape Navigator?
Is it professional to write unrelated content in an almost-empty email?
Does it take more energy to get to Venus or to Mars?
Won the lottery - how do I keep the money?
Phase of a real number
Interfacing a button to MCU (and PC) with 50m long cable
Why do professional authors make "consistency" mistakes? And how to avoid them?
How do I make a variable always equal to the result of some calculations?
How to Reset Passwords on Multiple Websites Easily?
Save panda boxplot as image
The Next CEO of Stack OverflowSelecting multiple columns in a pandas dataframeRenaming columns in pandasAdding new column to existing DataFrame in Python pandasDelete column from pandas DataFrame by column name“Large data” work flows using pandasHow to iterate over rows in a DataFrame in Pandas?Select rows from a DataFrame based on values in a column in pandasGet list from pandas DataFrame column headersPandas and Python image to numpy arrayPandas DataFrame Slicing issue
I'm trying to save a pandas.DataFrame.boxplot
variable to a image to use it with a Qt widget, but I don't know how to convert this variable. I have this code:
import matplotlib.pyplot as plt
from pandas import DataFrame
import numpy as np
df = DataFrame(np.random.rand(10,5))
plt.figure();
bp = df.boxplot()
And Spyder shows it:
Are there instructions to do it automatically within the code?
python pandas boxplot
add a comment |
I'm trying to save a pandas.DataFrame.boxplot
variable to a image to use it with a Qt widget, but I don't know how to convert this variable. I have this code:
import matplotlib.pyplot as plt
from pandas import DataFrame
import numpy as np
df = DataFrame(np.random.rand(10,5))
plt.figure();
bp = df.boxplot()
And Spyder shows it:
Are there instructions to do it automatically within the code?
python pandas boxplot
add a comment |
I'm trying to save a pandas.DataFrame.boxplot
variable to a image to use it with a Qt widget, but I don't know how to convert this variable. I have this code:
import matplotlib.pyplot as plt
from pandas import DataFrame
import numpy as np
df = DataFrame(np.random.rand(10,5))
plt.figure();
bp = df.boxplot()
And Spyder shows it:
Are there instructions to do it automatically within the code?
python pandas boxplot
I'm trying to save a pandas.DataFrame.boxplot
variable to a image to use it with a Qt widget, but I don't know how to convert this variable. I have this code:
import matplotlib.pyplot as plt
from pandas import DataFrame
import numpy as np
df = DataFrame(np.random.rand(10,5))
plt.figure();
bp = df.boxplot()
And Spyder shows it:
Are there instructions to do it automatically within the code?
python pandas boxplot
python pandas boxplot
edited Mar 7 at 15:26
Leos313
1,62411536
1,62411536
asked May 29 '17 at 14:12
Daniel GarciaDaniel Garcia
104
104
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Are you looking for a standard image format?
If so this will do the trick:
import matplotlib.pyplot as plt
plt.savefig()
docs:
https://matplotlib.org/devdocs/api/_as_gen/matplotlib.pyplot.savefig.html
add a comment |
Suppose you have multiple figures and you want to save them independently when you want in the code: make sure you can access it by a unique name:
fig100 = figure()
outputBoxplot100 = df_100.boxplot(column=['1', '2', '4', '5', '8'])
plt.title("100 MHz")
fig150 = figure()
outputBoxplot150 = df_150.boxplot(column=['1', '2', '4', '5', '8'])
plt.title("150 MHz")
# do other stuff
fig100.savefig("test100.svg", format="svg")
fig150.savefig("test150.svg", format="svg")
In this case, I would change your code in:
import matplotlib.pyplot as plt
from pandas import DataFrame
import numpy as np
df = DataFrame(np.random.rand(10,5))
myFig = plt.figure();
bp = df.boxplot()
myFig.savefig("myName.svg", format="svg")
The result will be a saved file named "myName.svg":
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f44244608%2fsave-panda-boxplot-as-image%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Are you looking for a standard image format?
If so this will do the trick:
import matplotlib.pyplot as plt
plt.savefig()
docs:
https://matplotlib.org/devdocs/api/_as_gen/matplotlib.pyplot.savefig.html
add a comment |
Are you looking for a standard image format?
If so this will do the trick:
import matplotlib.pyplot as plt
plt.savefig()
docs:
https://matplotlib.org/devdocs/api/_as_gen/matplotlib.pyplot.savefig.html
add a comment |
Are you looking for a standard image format?
If so this will do the trick:
import matplotlib.pyplot as plt
plt.savefig()
docs:
https://matplotlib.org/devdocs/api/_as_gen/matplotlib.pyplot.savefig.html
Are you looking for a standard image format?
If so this will do the trick:
import matplotlib.pyplot as plt
plt.savefig()
docs:
https://matplotlib.org/devdocs/api/_as_gen/matplotlib.pyplot.savefig.html
answered May 29 '17 at 14:18
Andrew LAndrew L
3,1732922
3,1732922
add a comment |
add a comment |
Suppose you have multiple figures and you want to save them independently when you want in the code: make sure you can access it by a unique name:
fig100 = figure()
outputBoxplot100 = df_100.boxplot(column=['1', '2', '4', '5', '8'])
plt.title("100 MHz")
fig150 = figure()
outputBoxplot150 = df_150.boxplot(column=['1', '2', '4', '5', '8'])
plt.title("150 MHz")
# do other stuff
fig100.savefig("test100.svg", format="svg")
fig150.savefig("test150.svg", format="svg")
In this case, I would change your code in:
import matplotlib.pyplot as plt
from pandas import DataFrame
import numpy as np
df = DataFrame(np.random.rand(10,5))
myFig = plt.figure();
bp = df.boxplot()
myFig.savefig("myName.svg", format="svg")
The result will be a saved file named "myName.svg":
add a comment |
Suppose you have multiple figures and you want to save them independently when you want in the code: make sure you can access it by a unique name:
fig100 = figure()
outputBoxplot100 = df_100.boxplot(column=['1', '2', '4', '5', '8'])
plt.title("100 MHz")
fig150 = figure()
outputBoxplot150 = df_150.boxplot(column=['1', '2', '4', '5', '8'])
plt.title("150 MHz")
# do other stuff
fig100.savefig("test100.svg", format="svg")
fig150.savefig("test150.svg", format="svg")
In this case, I would change your code in:
import matplotlib.pyplot as plt
from pandas import DataFrame
import numpy as np
df = DataFrame(np.random.rand(10,5))
myFig = plt.figure();
bp = df.boxplot()
myFig.savefig("myName.svg", format="svg")
The result will be a saved file named "myName.svg":
add a comment |
Suppose you have multiple figures and you want to save them independently when you want in the code: make sure you can access it by a unique name:
fig100 = figure()
outputBoxplot100 = df_100.boxplot(column=['1', '2', '4', '5', '8'])
plt.title("100 MHz")
fig150 = figure()
outputBoxplot150 = df_150.boxplot(column=['1', '2', '4', '5', '8'])
plt.title("150 MHz")
# do other stuff
fig100.savefig("test100.svg", format="svg")
fig150.savefig("test150.svg", format="svg")
In this case, I would change your code in:
import matplotlib.pyplot as plt
from pandas import DataFrame
import numpy as np
df = DataFrame(np.random.rand(10,5))
myFig = plt.figure();
bp = df.boxplot()
myFig.savefig("myName.svg", format="svg")
The result will be a saved file named "myName.svg":
Suppose you have multiple figures and you want to save them independently when you want in the code: make sure you can access it by a unique name:
fig100 = figure()
outputBoxplot100 = df_100.boxplot(column=['1', '2', '4', '5', '8'])
plt.title("100 MHz")
fig150 = figure()
outputBoxplot150 = df_150.boxplot(column=['1', '2', '4', '5', '8'])
plt.title("150 MHz")
# do other stuff
fig100.savefig("test100.svg", format="svg")
fig150.savefig("test150.svg", format="svg")
In this case, I would change your code in:
import matplotlib.pyplot as plt
from pandas import DataFrame
import numpy as np
df = DataFrame(np.random.rand(10,5))
myFig = plt.figure();
bp = df.boxplot()
myFig.savefig("myName.svg", format="svg")
The result will be a saved file named "myName.svg":
edited Mar 7 at 15:39
answered Mar 7 at 13:56
Leos313Leos313
1,62411536
1,62411536
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- 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.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f44244608%2fsave-panda-boxplot-as-image%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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