in Education by
I have two lists, same size, one is y_data and one is x_data x_data is a time hh:mm:ss during day, in fact each minute each serie is 1440 long. problem is : fig = Figure(figsize=(4,3)) a = gif.add_subplot(111) a.plot(x_data, y_data) give an unreadable x_axis (too many labels), if i reduce x_data to [range(24)] for instance, plot gives an error. Question : I'd like to have only 24 items on x_axis scale (each hour, so 1 item each 60 x_data points) is there a simple way to achieve this ? set_autoscale_on(False) and then manually setting limits seems a very complex way to achieve this (and I would loose the benefits from autoscaling on y axis). Another solution seems to involve a.xaxis.set_ticks() but i have to crate a new serie. o I'd like to use x_data but just limit the number of ticks shown on x_axis, is there a way to do it ? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
The pyplot interface of matplotlib provides a function locator_params, where you can set this option: fig = Figure(figsize=(4,3)) a = fig.add_subplot(111) a.plot(x_data, y_data) a.locator_params(nbins=4)

Related questions

0 votes
    Ticks are short lines that mark off an axis into segments of equal size. True False Select the correct answer from above options...
asked Dec 14, 2021 in Education by JackTerrance
0 votes
    How can I remove emojis that start with '\x' when reading a csv file using pandas in Python? The ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 14, 2022 in Education by JackTerrance
0 votes
    I'm trying to use the Android GraphView library (http://www.android-graphview.org/), but no matter ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 9, 2022 in Education by JackTerrance
0 votes
    Axes, axis labels and titles all appear in the ________ of the figure. (a) Directions (b) Margin labels ( ... Networks of R Programming Select the correct answer from above options...
asked Feb 11, 2022 in Education by JackTerrance
0 votes
    I have the data frame that looks like this: Date Visa Mastercard Amex Paypal 1/1/20 0 20 0 0 2/1/20 ... info() Any help is appreciated Select the correct answer from above options...
asked Jan 19, 2022 in Education by JackTerrance
0 votes
    This question already has answers here: How do I plot two countplot graphs side by side in seaborn? ( ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 7, 2022 in Education by JackTerrance
0 votes
    This question already has answers here: How do I plot two countplot graphs side by side in seaborn? ( ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 7, 2022 in Education by JackTerrance
0 votes
    What are custom labels in Salesforce? What is the character limit of custom label?...
asked Nov 11, 2020 in Technology by JackTerrance
0 votes
    How can I get the number of elements of a list? Ex- items = [] items.append("one") items.append("two") items.append("three") Select the correct answer from above options...
asked Jan 24, 2022 in Education by JackTerrance
0 votes
    I was trying to write a quick-and-dirty script to generate plots easily. For that, I was using the following code ( ... do I do that? Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    Which function draws an axis on the current plot? (a) axis() (b) par() (c) mar() (d) jar() This ... & Neural Networks of R Programming Select the correct answer from above options...
asked Feb 9, 2022 in Education by JackTerrance
0 votes
    Is there a way to determine how many capture groups there are in a given regular expression? I would ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 16, 2022 in Education by JackTerrance
0 votes
    Is there a way to determine how many capture groups there are in a given regular expression? I would ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 16, 2022 in Education by JackTerrance
0 votes
    Is there a way to determine how many capture groups there are in a given regular expression? I would ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 16, 2022 in Education by JackTerrance
...